Hello NG,
Can anybody tell me how to leave a process running after logging off? I
have tried postfixing with '&', which leaves my terminal clear to do
other stuff, but as soon as I close my terminal window, the process
terminates (I can see this by watching the running processes with 'top'
in another terminal window). How do I keep a process running after
logging off?
Thanks in advance!
Best,
M.L.
|
|
0
|
|
|
|
Reply
|
morten.langer (90)
|
5/17/2006 11:33:06 PM |
|
On Wed, 17 May 2006, M.L. wrote:
> Can anybody tell me how to leave a process running after logging off? I
> have tried postfixing with '&', which leaves my terminal clear to do
> other stuff, but as soon as I close my terminal window, the process
> terminates (I can see this by watching the running processes with 'top'
> in another terminal window). How do I keep a process running after
> logging off?
You need to use the nohup command:
$ nohup my_command &
Closing a terminal (or logginh out) causes a NOHUP signal to be sent
to the appropriate processes. The nohup command circumvents this.
HTH,
--
Rich Teer, SCNA, SCSA, OpenSolaris CAB member
President,
Rite Online Inc.
Voice: +1 (250) 979-1638
URL: http://www.rite-group.com/rich
|
|
0
|
|
|
|
Reply
|
Rich
|
5/17/2006 11:38:48 PM
|
|
Hi!
Thanks! I'll give it a try. Also thanks for your answer a few days ago
in my other thread (foce cp to overwrite existing files) - I just
noticed it now :)
Best,
M.L.
|
|
0
|
|
|
|
Reply
|
M
|
5/17/2006 11:43:11 PM
|
|
On Wed, 17 May 2006 16:33:06 -0700, M.L. wrote:
> Can anybody tell me how to leave a process running after logging off?
Use GNU screen.
|
|
0
|
|
|
|
Reply
|
Dave
|
5/17/2006 11:43:32 PM
|
|
M.L. <morten.langer@gmail.com> wrote:
> Hello NG,
>
> Can anybody tell me how to leave a process running after logging off? I
> have tried postfixing with '&', which leaves my terminal clear to do
> other stuff, but as soon as I close my terminal window, the process
> terminates (I can see this by watching the running processes with 'top'
> in another terminal window). How do I keep a process running after
> logging off?
>
> Thanks in advance!
# nohup (job) &
Colin
|
|
0
|
|
|
|
Reply
|
Colin
|
5/18/2006 12:50:17 AM
|
|
M.L. wrote:
>
> Can anybody tell me how to leave a process running after logging off?
>
As other said, 'nohup <command> &' will work but most of the times,
some times depending on the terminal, connection type 'ssh, telnet, r*'
it may not work. In general, I use
'at now' command which always works on any unix platform.
|
|
0
|
|
|
|
Reply
|
Vahid
|
5/18/2006 1:36:55 AM
|
|
Vahid Moghaddasi wrote:
> M.L. wrote:
>> Can anybody tell me how to leave a process running after logging off?
>>
> As other said, 'nohup <command> &' will work but most of the times,
> some times depending on the terminal, connection type 'ssh, telnet, r*'
> it may not work. In general, I use
> 'at now' command which always works on any unix platform.
>
On Linux, in C, it's possible to call daemon() to detach the prog... Is
it possible with Solaris ?
My (little) research was unsuccessful
Thanks in advance...
Michael
|
|
0
|
|
|
|
Reply
|
Michael
|
5/18/2006 11:02:03 AM
|
|
Hi,
Vahid Moghaddasi wrote:
> M.L. wrote:
>
>>Can anybody tell me how to leave a process running after logging off?
>>
>
> As other said, 'nohup <command> &' will work but most of the times,
> some times depending on the terminal, connection type 'ssh, telnet, r*'
> it may not work. In general, I use
> 'at now' command which always works on any unix platform.
>
With the benefit of having a email when/if it terminates!
/michael
|
|
0
|
|
|
|
Reply
|
Michael
|
5/18/2006 12:13:06 PM
|
|
Vahid Moghaddasi <moghaddasi@gmail.com> wrote:
> M.L. wrote:
>>
>> Can anybody tell me how to leave a process running after logging off?
>>
> As other said, 'nohup <command> &' will work but most of the times,
> some times depending on the terminal, connection type 'ssh, telnet, r*'
> it may not work. In general, I use
> 'at now' command which always works on any unix platform.
Good alternative, but can you give an example of when nohup fails? I've
never seen it not work, that I can remember.
Colin
|
|
0
|
|
|
|
Reply
|
Colin
|
5/18/2006 5:56:41 PM
|
|
I found that it failed with vncserver
G
"Colin B." <cbigam@somewhereelse.nucleus.com> wrote in message
news:446cb557@news.nucleus.com...
> Vahid Moghaddasi <moghaddasi@gmail.com> wrote:
>> M.L. wrote:
>>>
>>> Can anybody tell me how to leave a process running after logging off?
>>>
>> As other said, 'nohup <command> &' will work but most of the times,
>> some times depending on the terminal, connection type 'ssh, telnet, r*'
>> it may not work. In general, I use
>> 'at now' command which always works on any unix platform.
>
> Good alternative, but can you give an example of when nohup fails? I've
> never seen it not work, that I can remember.
>
> Colin
|
|
0
|
|
|
|
Reply
|
george2
|
8/13/2007 10:43:38 AM
|
|
|
9 Replies
845 Views
(page loaded in 0.142 seconds)
Similiar Articles: Leaving a process running after log-off - comp.unix.solaris ...Hello NG, Can anybody tell me how to leave a process running after logging off? I have tried postfixing with '&', which leaves my terminal clear to d... Ftp Automatic Login Help - comp.sys.hp.hpuxLeaving a process running after log-off - comp.unix.solaris ... Ftp Automatic Login Help - comp.sys.hp.hpux I am trying to auto ftp process, but I can't get around the ... shutdown procedure - comp.dcom.sys.ciscoLeaving a process running after log-off - comp.unix.solaris ... shutdown procedure - comp.dcom.sys.cisco Interrupt Boot Process on HP 382 Workstation running HP-UX 9.10 ... lp commands take a while to execute - comp.unix.solarisI used an HP printer with a JetDirect card and got off ... comp.unix.solaris ..... attach to a running process, do some stuff, exit while leaving process running, but I ... Getting a hConsoleOutput handle - comp.os.ms-windows.programmer ...All I saw was how to log in, I didn't see anything about running more commands after ... get these handles is to run in-process ... of commands, then leaving it running.</p ... CreateProcess with a specific user login credentials - comp.lang ...Unless you know of any specific process that needs to be run by the login at the console then its not a ... P.SQL V8.5 - turning off security - comp.databases.btrieve ... > C ... socket in use ? - comp.protocols.time.ntpAfter running for a while without problems, I now get this ... no idea whats going on here, ps shows no ntp-process running... ... internet via another linux-server I had to leave ... Listen to multiple ports - comp.lang.cBut when looking at a server running ... file, one set of log files, start/stop one process, etc. ... accepted, it will be handed off to a worker > thread or process. After ... Can not login Solaris 10 with root via PuTTY. - comp.unix.solaris ...Hello, Before I can login Solaris 10 via PuTTY with root user, but after run ... tried kill -9 the aset process, and the /etc/default/login ... Going a little off topic ... keeping ntpd running - comp.unix.solariswe have systems running ntpd started by startup script. Typically the process dies at some... ... will vote the false ticker off the ... running - comp.unix.solaris ntpd log ... Leaving a process running after log-off - comp.unix.solaris ...Hello NG, Can anybody tell me how to leave a process running after logging off? I have tried postfixing with '&', which leaves my terminal clear to d... leave process running after logoff - LinuxQuestions.orgi have a machine without a monitor so i use ssh to control it but how can i leave a program running after i log off.. 7/21/2012 8:22:10 PM
|