On Tue, 30 Sep 2003, Alex Rhomberg wrote:

> > How can i left proccess running in my LEAF (Bering) Box after
> > logout a ssh sesion?
> > in linux exist a NOARCH command but , what can i do in LEAF, how
> > can i install that command on LEAF?
> 
> You have to detach everything from you tty, i.e. stdin, stdout and stderr
> and start a background process:
> Example:
> command </dev/null >cmd.stdout 2>cmd.stderr &

This didn't seem to work, so I took the opportunity to investigate. You
also need to trap SIGHUP:

 # (trap 1; command </dev/null >cmd.stdout 2>cmd.stderr ) &

I also noticed along the way that Debian (unlike BSD and V7 which use C
binaries; I don't know about other Linux distros) implements nohup as a sh
script that does the above with a little more finesse.

> Some commands can run in daemon mode where they detach themselves from the
> current tty automatically.

Looking in a manpage for the option to enable such behavior could be
worthwhile. In the more-than-you-wanted-to-know department, understanding
how daemons and zombies work is a more advanced topic worth learning
about to help interpret the output of ps. [1]

[1] http://www.faqs.org/faqs/unix-faq/programmmer/faq/  Section 1.6

---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<[EMAIL PROTECTED]>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...2k
---------------------------------------------------------------------------




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
------------------------------------------------------------------------
leaf-user mailing list: [EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/leaf-user
SR FAQ: http://leaf-project.org/pub/doc/docmanager/docid_1891.html

Reply via email to