Unix Technical Forum

spawning a process which stays running after logoff

This is a discussion on spawning a process which stays running after logoff within the AIX Operating System forums, part of the Unix Operating Systems category; --> How do you spawn a process which stays running even when log off? I use the & at the ...


Go Back   Unix Technical Forum > Unix Operating Systems > AIX Operating System

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-17-2008, 07:02 AM
C C
 
Posts: n/a
Default spawning a process which stays running after logoff

How do you spawn a process which stays running even when log off?
I use the & at the end of the command line to run it in the background
but when I log off, the process dies also. How do I run it so that it will
be under pid 1?
Thanks in advance.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 03-17-2008, 07:02 AM
Hajo Ehlers
 
Posts: n/a
Default Re: spawning a process which stays running after logoff

On Mar 12, 8:11 pm, "C C" <some...@atsbcglobal.net> wrote:
> How do you spawn a process which stays running even when log off?
> I use the & at the end of the command line to run it in the background
> but when I log off, the process dies also. How do I run it so that it will
> be under pid 1?
> Thanks in advance.


$ echo MyProg | at now # Output will be send via mail to the
user

or

$ nohup MyProg 1>/dev/null 2>&1 &

hth
Hajo

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 03-17-2008, 07:02 AM
C C
 
Posts: n/a
Default Re: spawning a process which stays running after logoff


"Hajo Ehlers" <service@metamodul.com> wrote in message
news:d78b5f65-95fd-49f7-a38b-740157171fad@b64g2000hsa.googlegroups.com...
> On Mar 12, 8:11 pm, "C C" <some...@atsbcglobal.net> wrote:
>> How do you spawn a process which stays running even when log off?
>> I use the & at the end of the command line to run it in the background
>> but when I log off, the process dies also. How do I run it so that it
>> will
>> be under pid 1?
>> Thanks in advance.

>
> $ echo MyProg | at now # Output will be send via mail to the
> user
>
> or
>
> $ nohup MyProg 1>/dev/null 2>&1 &
>
> hth
> Hajo
>


Thank you!!!!

I'll use nohup.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 03-17-2008, 07:02 AM
Thomas Braunbeck
 
Posts: n/a
Default Re: spawning a process which stays running after logoff

C C schrieb:
> How do you spawn a process which stays running even when log off?
> I use the & at the end of the command line to run it in the background
> but when I log off, the process dies also. How do I run it so that it will
> be under pid 1?
> Thanks in advance.
>
>

in C
http://www.koders.com/c/fidAEA7BDF8A...E.aspx?s =md5
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 03-17-2008, 07:02 AM
asymont@netscape.net
 
Posts: n/a
Default Re: spawning a process which stays running after logoff

On 13 ÍÁÒ, 02:10, Thomas Braunbeck <Thomas.Braunb...@orange.fr> wrote:
> C C schrieb:> How do you spawn a process which stays running even when logoff?
> > I use the & at the end of the command line to run it in the background
> > but when I log off, the process dies also. šHow do I run it so that itwill
> > be under pid 1?
> > Thanks in advance.

>
> in Chttp://www.koders.com/c/fidAEA7BDF8A5505BE388BB0D031CCDFCA32E052E0E.a....


Hi, all!
I wonder if it's possible to change running process so that it will
stay running after log off.
I mean, after it was spawn in an ordinary way.
Thanks in advance.
Stanislav
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 03-17-2008, 07:02 AM
Andreas Schulze
 
Posts: n/a
Default Re: spawning a process which stays running after logoff

On 13 Mrz., 04:41, asym...@netscape.net wrote:
> [...]
> Hi, all!
> I wonder if it's possible to change running process so that it will
> stay running after log off.
> I mean, after it was spawn in an ordinary way.
> Thanks in advance.
> Stanislav


beginning with AIX 5.3 an option has been added to nohup command to
nohup an existing process. man nohup.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 03:21 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com