From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 23 08:59:21 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 0060A16A468 for ; Mon, 23 Jul 2007 08:59:20 +0000 (UTC) (envelope-from peter@boosten.org) Received: from ra.egypt.nl (cp268254-a.landg1.lb.home.nl [213.51.103.48]) by mx1.freebsd.org (Postfix) with ESMTP id A357613C483 for ; Mon, 23 Jul 2007 08:59:20 +0000 (UTC) (envelope-from peter@boosten.org) Received: from ra.egypt.nl (localhost.egypt.nl [127.0.0.1]) by ra.egypt.nl (Postfix) with ESMTP id A856939884 for ; Mon, 23 Jul 2007 10:59:19 +0200 (CEST) Received: by ra.egypt.nl (Postfix, from userid 1008) id 34FF63987F; Mon, 23 Jul 2007 11:04:54 +0200 (CEST) Received: from ra.egypt.nl (localhost.egypt.nl [127.0.0.1]) by ra.egypt.nl (Postfix) with ESMTP id 2846A3987B for ; Mon, 23 Jul 2007 10:51:20 +0200 (CEST) Received: by ra.egypt.nl (Postfix, from userid 1008) id E999A39868; Mon, 23 Jul 2007 10:53:37 +0200 (CEST) Received: from ra.egypt.nl (localhost.egypt.nl [127.0.0.1]) by ra.egypt.nl (Postfix) with ESMTP id CA53439884 for ; Mon, 23 Jul 2007 10:48:34 +0200 (CEST) Received: by ra.egypt.nl (Postfix, from userid 501) id 8406B3987F; Mon, 23 Jul 2007 10:48:34 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.2.1 (2007-05-02) on ra.egypt.nl X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=ALL_TRUSTED, AWL autolearn=ham version=3.2.1 Received: from [127.0.0.1] (xp.egypt.nl [192.168.13.35]) by ra.egypt.nl (Postfix) with ESMTP id C8ED839868 for ; Mon, 23 Jul 2007 10:48:30 +0200 (CEST) Message-ID: <46A46B5C.5080003@boosten.org> Date: Mon, 23 Jul 2007 10:48:28 +0200 From: Peter Boosten User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.4) Gecko/20060516 Thunderbird/1.5.0.4 Mnenhy/0.7.4.666 MIME-Version: 1.0 To: hackers@freebsd.org References: <46A46910.9080901@u.washington.edu> <46A4699C.5080906@u.washington.edu> <46A46A40.1080004@fs.ei.tum.de> In-Reply-To: <46A46A40.1080004@fs.ei.tum.de> X-Enigmail-Version: 0.95.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 000758-3, 07/22/2007), Outbound message X-Antivirus-Status: Clean X-Virus-Scanned: ClamAV using ClamSMTP X-Virus-Scanned: ClamAV using ClamSMTP X-Virus-Scanned: ClamAV using ClamSMTP Cc: 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:59:21 -0000 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? >>> 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. > What's wrong with nohup(1)? Peter -- http://www.boosten.org