Date: Tue, 16 Jan 2001 01:38:54 -0600 From: Christopher Farley <chris@northernbrewer.com> To: Cliff Sarginson <cliff@raggedclown.net> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Detatch process from terminal? Message-ID: <20010116013854.D31629@northernbrewer.com> In-Reply-To: <E14IQVm-000MDz-00@post.mail.nl.demon.net>; from cliff@raggedclown.net on Tue, Jan 16, 2001 at 07:26:34AM %2B0000 References: <E14IQVm-000MDz-00@post.mail.nl.demon.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Cliff Sarginson (cliff@raggedclown.net) wrote: > > Some processes can be launched from an shell, such as vim (and I presume > > emacs) so that PID 1 (init) is the parent of the process, and not the > > shell that launches it. > > Why on earth would you want to do this with vi ? Near to useless I would > think ! Sorry, vim -g launches the GUI version of vim. Admittedly, I prefer the terminal version, but to call it useless is perhaps extreme! ;) > > Is there a shell command that will cause init to fork the new process > > instead of the shell? > > You are misunderstaning a few things here. Init inherits processes whose > parent process dies, or who detach themselves from the parent, this > can be done explicitly in the program code. There is almost certainly > a wrapper that will cause this to happen .. it's name I do not know. Running > a program nohup in the background from your login shell and logging out > will work a treat ! I know the daemon() function call does this in C, but yes... I am wondering if there is a wrapper that can be called from a shell command... perhaps part of the base system? (OPTIONAL EXPLANATION: At my workplace I need to recieve Windows PopUp messages, so I run LinPopUp; I normally run it when my X session starts, but because LinPopUp is not designed as a daemon, I occasionally [accidentally] close the window and the process dies. I would like to re-start it from the command line, and prevent it from dying if I later close the XTerm from which it was launched.) -- Christopher Farley Northern Brewer / 1150 Grand Avenue / St. Paul, MN 55105 www.northernbrewer.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010116013854.D31629>