bug-coreutils@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Bob Hepple <bob.hepple@gmail.com>
To: 67680@debbugs.gnu.org
Subject: bug#67680: nohup is not giving immunity to SIGHUP
Date: Thu, 7 Dec 2023 18:13:01 +1000	[thread overview]
Message-ID: <CAHzpm2hEZ8bHrNggAszGGavnXoiXi0pnkHMzgmXjMqDgsb8aGA@mail.gmail.com> (raw)

$ nohup --version
nohup (GNU coreutils) 9.3
$ uname -a
Linux achar-void 6.5.12_1 #1 SMP PREEMPT_DYNAMIC Mon Nov 20 18:31:50
UTC 2023 x86_64 GNU/Linux

This is on void, but it also behaves the same on fedora-38

I have extracted a minimal example - it looks like a stupid thing to
do but it demonstrates the problem. A full and non-stupid script is at

https://gitlab.com/wef/dotfiles/-/blob/master/bin/fzf-launcher

Nevertheless - the following commands are run from bash in a graphical
session. 'foot' is a terminal emulator - any terminal emulator can be
used - I have tried mrxvt, urxvt, alacritty.

'imv' is a simple program that opens a window. Anything else with a
.desktop file could be used, such as 'rofi' or 'xsane'.

$ foot -e bash -c "nohup gtk-launch imv &"
... fails - the program imv briefly opens a window and immediately closes

$ foot -e bash -c "nohup gtk-launch imv & sleep 3"
.... the 'imv' window shows but it is closed after 3 seconds - clearly
the program 'imv' starts but is killed by something when the script
terminates.

$ foot -e bash -c "trap '' HUP; nohup gtk-launch imv &"
... works perfectly - the 'something' that is killing imv is
apparently the HUP signal! So why does nohup not grant immunity to
HUP?




             reply	other threads:[~2023-12-07  8:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-07  8:13 Bob Hepple [this message]
2023-12-07 15:18 ` bug#67680: nohup is not giving immunity to SIGHUP Pádraig Brady

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.gnu.org/mailman/listinfo/bug-coreutils

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHzpm2hEZ8bHrNggAszGGavnXoiXi0pnkHMzgmXjMqDgsb8aGA@mail.gmail.com \
    --to=bob.hepple@gmail.com \
    --cc=67680@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).