From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 23 08:43:47 2007 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8AB916A41A for ; Mon, 23 Jul 2007 08:43:47 +0000 (UTC) (envelope-from corecode@fs.ei.tum.de) Received: from stella.fs.ei.tum.de (stella.fs.ei.tum.de [IPv6:2001:4ca0:22ff:10::7]) by mx1.freebsd.org (Postfix) with ESMTP id 24CF813C442 for ; Mon, 23 Jul 2007 08:43:47 +0000 (UTC) (envelope-from corecode@fs.ei.tum.de) Received: from localhost (localhost [127.0.0.1]) by localhost.fs.ei.tum.de (Postfix) with ESMTP id E7D72280F1; Mon, 23 Jul 2007 10:43:44 +0200 (CEST) X-Virus-Scanned: by amavisd-new at fs.ei.tum.de Received: from stella.fs.ei.tum.de ([127.0.0.1]) by localhost (stella.fs.ei.tum.de [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 5rolGH50tf30; Mon, 23 Jul 2007 10:43:44 +0200 (CEST) Received: from sweatshorts.home.corecode.ath.cx (85-218-11-202.dclient.lsne.ch [85.218.11.202]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by stella.fs.ei.tum.de (Postfix) with ESMTP id 90E3B280E7; Mon, 23 Jul 2007 10:43:44 +0200 (CEST) Message-ID: <46A46A40.1080004@fs.ei.tum.de> Date: Mon, 23 Jul 2007 10:43:44 +0200 From: Simon 'corecode' Schubert User-Agent: Thunderbird 2.0.0.4 (X11/20070627) MIME-Version: 1.0 To: Garrett Cooper References: <46A46910.9080901@u.washington.edu> <46A4699C.5080906@u.washington.edu> In-Reply-To: <46A4699C.5080906@u.washington.edu> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Cc: 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 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 08:43:47 -0000 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/ I suggest daemon(3) if it doesn't have to be portable. cheers simon -- Serve - BSD +++ RENT this banner advert +++ ASCII Ribbon /"\ Work - Mac +++ space for low €€€ NOW!1 +++ Campaign \ / Party Enjoy Relax | http://dragonflybsd.org Against HTML \ Dude 2c 2 the max ! http://golden-apple.biz Mail + News / \