coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [SUGGESTION] nohup_${PID}.out


From: Bernhard Voelker
Subject: Re: [SUGGESTION] nohup_${PID}.out
Date: Mon, 19 Feb 2018 00:14:17 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

On 02/18/2018 12:26 PM, Boruch Baum wrote:
1] Wouldn't it be useful for nohup to indicate the PID of the process it
spawns?

nohup(1) does *not* create a new process.  Instead, it invokes execve to replace
its own image with that of the new one (in the same process), i.e., there is no
new PID.  You can check via strace(1) to see what happens.

P.S. Often one sends such a process to the background - as you said with '&':

  $ nohup sleep 1000 &

This is a shell feature, and you can use $! to get the PID for further
tracking etc., e.g.:

  $ kill $!

Have a nice day,
Berny



reply via email to

[Prev in Thread] Current Thread [Next in Thread]