Hello,

On 2019-02-17 1:12 p.m., Paul Eggert wrote:
Assaf Gordon wrote:
I don't mind either way (env feature or new program).

This should be a new feature of 'nohup' not 'env', as 'nohup' is already about signal handling.  I don't see a need for a new program.

With 'nohup' I don't think there will be an easy (or at least intuitive
way) to 'untrap' SIGPIPE without affecting the output: STDOUT will be redirected to 'nohup.out' automatically (unless we add more options like "--no-redirect").

Example:

    env -C /foo/bar PROGRAM            ## only change directory
    env --default-signal=PIPE PROGRAM  ## only untrap SIGPIPE
    env -i PROGRAM                     ## only empty environment

but

    nohup --default-signal=PIPE PROGRAM

Will untrap SIGPIPE *and* SIGHUP *and* redirect stdout to a file.
So we'll need to add:

  nohup --no-redirect-stdout --default-signal=PIPE PROGRAM

Also,
nohup's manual pages warns:
   "NOTE:  your  shell  may  have  its own version of nohup, which
    usually supersedes the version described here.  Please refer to
    your shell's documentation for details about the options it
    supports."

And if there is a built-in "nohup", it will confuse users who want to
use our new feature (and then more support questions, and we have to
explain how to use "env nohup" or "\nohup".

What do you think?

-assaf







Reply via email to