Make the daemon process a true daemon by calling setsid().

PR:		bin/3202
Submitted by:	Dmitrij Tejblum <dima@tejblum.dnttm.rssi.ru>
This commit is contained in:
Joerg Wunsch 1997-08-23 14:10:34 +00:00
parent 84c2e30193
commit 32c9dffb9d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=28613

View File

@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id$
* $Id: shutdown.c,v 1.7 1997/06/19 14:28:32 charnier Exp $
*/
#ifndef lint
@ -196,6 +196,7 @@ main(argc, argv)
if (forkpid)
errx(0, "[pid %d]", forkpid);
}
setsid();
#endif
openlog("shutdown", LOG_CONS, LOG_AUTH);
loop();