Re: How do I daemonize a process?

看板FB_hackers作者時間18年前 (2007/07/24 11:06), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串6/9 (看更多)
Simon 'corecode' Schubert wrote: > Garrett Cooper wrote: >> Garrett Cooper wrote: >>> As the subject suggests I'm trying to determine how I can >>> daemonize a C process, outside of using the rc infrastructure, so >>> that it won't exit when the TTY exists. Does anyone know any quick >>> references or examples? > > I suggest daemon(3) if it doesn't have to be portable. Or something like this, if it has to be portable or if you don't want to modify C code : nohup /pathto/c-application & You'll eventually need to add things like redirect stdout to /dev/null... -- --------------------------------------------------------------- Jose Marcio MARTINS DA CRUZ Ecole des Mines de Paris http://j-chkmail.ensmp.fr 60, bd Saint Michel http://www.ensmp.fr/~martins 75272 - PARIS CEDEX 06 mailto:Jose-Marcio.Martins@ensmp.fr _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
文章代碼(AID): #16fMp600 (FB_hackers)
討論串 (同標題文章)
文章代碼(AID): #16fMp600 (FB_hackers)