From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 23 09:08:09 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A9C016A468 for ; Mon, 23 Jul 2007 09:08:09 +0000 (UTC) (envelope-from jacques@trispen.com) Received: from brolloks.trispen.com (brolloks.trispen.com [196.22.177.34]) by mx1.freebsd.org (Postfix) with ESMTP id CC30813C478 for ; Mon, 23 Jul 2007 09:08:08 +0000 (UTC) (envelope-from jacques@trispen.com) Received: by brolloks.trispen.com (Postfix, from userid 1000) id BA56620A; Mon, 23 Jul 2007 10:46:50 +0200 (SAST) Date: Mon, 23 Jul 2007 10:46:50 +0200 From: Jacques Fourie To: Garrett Cooper Message-ID: <20070723084650.GA32117@trispen.com> References: <46A46910.9080901@u.washington.edu> <46A4699C.5080906@u.washington.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46A4699C.5080906@u.washington.edu> User-Agent: Mutt/1.5.11 Cc: freebsd-hackers@freebsd.org Subject: Re: How do I daemonize a process? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: jf@trispen.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jul 2007 09:08:09 -0000 On Mon, Jul 23, 2007 at 01:41:00AM -0700, 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? > >Thanks, > >-Garrett > > s/C process/C application process/ > s/exists/exits/ > s/any quick/of any quick/ > > Tonight's not my night for communicating I suppose :(.. > -Garrett > _______________________________________________ > 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" If you can modify the source, have a look at the daemon() function : man 3 daemon jacques