Background processes after log off

Background processes after log off

Post by Dani » Tue, 22 Jun 1993 07:09:19



How can I get a shell process to continue running in the background
logging off?  I tried "[prog] > /dev/null" but this didn't
work.                                                              
 
 
 

Background processes after log off

Post by Rob Ry » Tue, 22 Jun 1993 07:30:19



Quote:>How can I get a shell process to continue running in the background
>logging off?  I tried "[prog] > /dev/null" but this didn't
>work.                                                              

A commonly asked question.  Try "nohup [prog] > /dev/null &".  The nohup
program makes the background job impervious to hangups.  See "man nohup"
for more information.

-- Rob

--
Rob Ryan, System Constructs Inc.


 
 
 

Background processes after log off

Post by Bill Rieme » Wed, 23 Jun 1993 05:15:16


Nntp-Posting-Host: eta.cs.concordia.ca

        Daniel> How can I get a shell process to continue running in the background
        Daniel> logging off?  I tried "[prog] > /dev/null" but this didn't
        Daniel> work.                                                              

This depends slightly on the shell you are using.  In your example,

  nohup [prog] >& /dev/null

would work.  If you are using csh, and the program is already running
in the forground then:

^Z --> Or whatever your stop signal key is defined as.

bg %  --> This continues the process in the background.

exec /bin/csh  --> This leaves all background processes orphans that
                   will continue after you logout, or kill the current
                   window.

If you want to start something in the background then:

[prog] >& /dev/null &

Just say csh job controle is fun, five times fast.

                          Bill

--
"Yeti!  Saw them in the London Underground twenty years ago.  Ghosts!
A headless woman used to walk through my bedroom at midnight.  Mermaids?
Grandpa was rescued from the Marie Celeste by one.  Vampires?  I always
wondered where my dad went to at night.  Telepathy?  Right now you're
thinking that I'm talking crap.  So what can you tell me that I won't
believe in?" - Andrew Hunt, "CAT'S CRADLE: WITCH MARK"

 
 
 

Background processes after log off

Post by Justin Ma » Wed, 23 Jun 1993 01:34:42




>>How can I get a shell process to continue running in the background
>>logging off?  I tried "[prog] > /dev/null" but this didn't
>>work.                                                              
>A commonly asked question.  Try "nohup [prog] > /dev/null &".  The nohup
>program makes the background job impervious to hangups.  See "man nohup"
>for more information.

        How does the nohup command differ from simply running something
in the background?  I usually just run my stuff in the background and log
out; they don't get killed...  The man pages just say "makes program
impervious to hangups."  How does it do it?

--

                                University of Colorado, Boulder
======================================================================

 
 
 

Background processes after log off

Post by Rob Ry » Wed, 23 Jun 1993 08:39:04





>>>How can I get a shell process to continue running in the background
>>>logging off?  I tried "[prog] > /dev/null" but this didn't
>>>work.                                                              
>>A commonly asked question.  Try "nohup [prog] > /dev/null &".  The nohup
>>program makes the background job impervious to hangups.  See "man nohup"
>>for more information.

>    How does the nohup command differ from simply running something
>in the background?  I usually just run my stuff in the background and log
>out; they don't get killed...  The man pages just say "makes program
>impervious to hangups."  How does it do it?

It's actually a function of what shell you use.  Some shells, if you
start the job in background, will automatically designate the nohup
for you.  For example, I believe that bash does that, zsh has the
option, and csh (on some machines, anyway) does it too.  But, as a rule,
you can't assume that background jobs will be impervious to hangups.
In those cases, you use nohup.

-- Rob
--
Rob Ryan, System Constructs Inc.

 
 
 

Background processes after log off

Post by Noah Hest » Thu, 24 Jun 1993 09:02:55


I think foobar > & dev/null will send the output to the bit
bucket. Instead of dev/null try /tmp/tempoutfile.

Noah Hester
Cleveland State University

 
 
 

Background processes after log off

Post by Lawrence Kir » Sat, 26 Jun 1993 20:02:35




>>How can I get a shell process to continue running in the background
>>logging off?  I tried "[prog] > /dev/null" but this didn't
>>work.                                                              

>A commonly asked question.  Try "nohup [prog] > /dev/null &".  The nohup
>program makes the background job impervious to hangups.  See "man nohup"
>for more information.

Is this a security problem? i.e. can the nohup'd process interfere with the
session of the next prson to log onto that tty? What about their ps display?

-----------------------------------------


-----------------------------------------

 
 
 

1. Background process is killed when user logs off on AIX

I have a shell script that calls a Perl script, the shell script is
run as a background process (i.e. from csh 'script.sh >& /dev/null
&'). If the user that started the script is logged in, then the script
runs without problem for days. But as soon as the user is logged off,
the Perl script as well as it's parent shell script are killed within
a few hours. I've tried to catch the signals in the Perl script but
nothing shows up, so I'm lead to believe that my process is being kill
with a -KILL signal. The same script runs without problem on Solaris.

My 'ulimit -a' is as follows:
time(seconds)        unlimited
file(blocks)         unlimited
data(kbytes)         131072
stack(kbytes)        32768
memory(kbytes)       32768
coredump(blocks)     2097151
nofiles(descriptors) 2000

As far as I know, we don't have sysops running scripts to kill off
processes for users that are not actively logged in (unless there's
something that's turned on by default in the Operating System). I'm
running on AIX 4.3 and am new to AIX. Can anyone explain how a
background process is tied to the user's login process and why the
user has to remain logged in?

Any assistance is much appreciated!

Thanks,
Fanny

2. Can't ftp or telnet own machine !! HELP !!

3. Background processes after log off

4. "simple" ln query

5. Can I run a process in background while I logged-off?

6. Wrong netmask

7. Killing csh background process **AND** any unfinished processes (fg and background) it started

8. file existence

9. resuming a background program after logging off / on

10. Jobs in Background Running after logged off

11. Results off background processes

12. on going processes while logging off

13. Logging off kills a process