From owner-freebsd-arch@FreeBSD.ORG Tue Aug 23 08:25:09 2005 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BB23D16A41F; Tue, 23 Aug 2005 08:25:09 +0000 (GMT) (envelope-from stb@lassitu.de) Received: from rohrpostix.tallence.de (rohrpostix.tallence.de [212.12.62.166]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5BFC643D46; Tue, 23 Aug 2005 08:25:09 +0000 (GMT) (envelope-from stb@lassitu.de) Received: from [44.128.40.11] (janus.spock.tallence.de [44.128.40.11]) by rohrpostix.tallence.de (Postfix) with ESMTP id 5FC401AD91C; Tue, 23 Aug 2005 10:25:07 +0200 (CEST) In-Reply-To: <20050822213028.GB4812@garage.freebsd.pl> References: <20050822213028.GB4812@garage.freebsd.pl> Mime-Version: 1.0 (Apple Message framework v733) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Stefan Bethke Date: Tue, 23 Aug 2005 10:25:09 +0200 To: Pawel Jakub Dawidek X-Mailer: Apple Mail (2.733) Cc: FreeBSD-arch Subject: Re: New library: libpidfile. X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Aug 2005 08:25:09 -0000 Random thoughts: Am 22.08.2005 um 23:30 schrieb Pawel Jakub Dawidek: > if (pidfile_open("/var/run/daemon.pid", 0644, &otherpid) == -1) { > pidfile_write(); > pidfile_close(); I can't really think of a case that would need it, but wouldn't it make sense to have pidfile_open return a handle, and use that in the subsequent calls? Just in case anyone would ever need more than one... Does this API have any implications for privsep'ed daemons? Stefan -- Stefan Bethke Fon +49 170 346 0140