[sclug] Leave a process running after logging out?

David Newcomb david.newcomb at bigsoft.co.uk
Wed Feb 16 01:42:59 UTC 2005


Persumably if there is a large amount of output or the output is required
for a report then you would do:

    # ./myprog > myprog.out 2> myprog.err

to capture the output, then the output would not be lost?

David.

J.Mann said:
>
>> If I use Ctrl-Z the process is still killed when I log off.
>
> The process is probably quitting because it has received a SIGHUP.
>
> After you pause ("ctrl-z") and background ("bg") your process, use
> "disown" to prevent bash from sending it a SIGHUP when you logout.
>
> Unfortunately, after you logout the output of the process is lost -
> although it will continue to run, until it finishes.
>
> If you want to capture the output of a command after logout,
> you must remember to launch it using "screen" or "nohup".
>
> Regards,
> Jon Mann.
>
>
>
> On Tue, Feb 15, 2005 at 06:39:20PM +0000, Sapan Ganguly wrote:
>> Hello, I haven't posted here for a long time.  I have a question which
>> probably has a simple answer.
>>
>> I am forever starting commands in a bash shell that take longer than I
>> expect, is there a way to background or pause a task that is already
>> in the foreground AND log off and go home (but still see the results
>> when I log on again in the morning)?  Sometimes I forget to use things
>> like 'screen', 'nohup' etc.  If I use Ctrl-Z the process is still
>> killed when I log off.
>>
>> Oh, another question, would 'nohup' stop a process being killed even
>> if I log out of my shell?
>>
>> Any ideas?
>>
>> Thanks,
>> Sapan
>> _______________________________________________
>> sclug mailing list
>> sclug at sclug.org.uk
>> http://www.sclug.org.uk/mailman/listinfo/sclug
>>
> _______________________________________________
> sclug mailing list
> sclug at sclug.org.uk
> http://www.sclug.org.uk/mailman/listinfo/sclug
>


Regards,
David
---------------------------------------
Managing Director
+44 (0) 7866 262 398
BigSoft Limited
Reading, UK
http://www.bigsoft.co.uk/




More information about the Sclug mailing list