[ale] Background process

Jonathan Feldman Jonathan at chathamcounty.org
Thu Sep 21 10:21:50 EDT 2000


My favorite way to do this is to use "at", as in:

$ at now + 1 minute
/usr/bin/prog > /var/log/proglog
<CTRL-D>

or, of course:

$ echo "/usr/bin/prog > /var/log/proglog" | at now + 1 minute

I like this better because you can provide "at" a more complex  stream.  (I've found that nohup can get confused when you start piping and redirecting...) Of course, you need access to "at", but ... FWIW.

--Jonathan
"SAMS Teach Yourself Network Troubleshooting"
"Network+ Exam Guide"
http://feldman.org

>>> "Gary Maltzen" <maltzen at mm.com> 09/20 7:56 PM >>>
In addition to the 'nohup' command, you should check out the 'screen'
command which lets you start sessions where you can disconnect and
reconnect...

Also, ISTR there was also a way to make a prog a child of init by doing
something like

   ( prog & ) &

Eric Brubakken asked...
> OK,  dumb question for the day...
>
> How would I start a program that would run as a background process?  So
that
> when I terminate my session the process continues?
>
> I remember something like ./myprogram& or something like that..


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.





More information about the Ale mailing list