NetBSD Problem Report #2949

Received: (qmail-queue invoked from smtpd); 18 Nov 1996 01:53:32 -0000
Message-Id: <>
Date: Sun, 17 Nov 1996 19:51:46 -0600 (CST)
From: Peter Seebach <>
Subject: daemon() should not be in &lt;stdlib.h&gt;
X-Send-Pr-Version: 3.95

>Number:         2949
>Category:       standards
>Synopsis:       daemon() should not be in &lt;stdlib.h&gt;
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    gnats-admin
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Nov 17 18:05:00 +0000 1996
>Closed-Date:    Mon Jan 04 22:20:45 +0000 1999
>Last-Modified:  Mon Jan 04 22:21:07 +0000 1999
>Originator:     Peter Seebach
>Release:        1.2
Peter Seebach - - Copyright 1996 Peter Seebach.
C/Unix wizard -- C/Unix questions? Send mail for help.  No, really!
Unsolicited email is not welcome, and will be billed for at consulting rates.
The *other* C FAQ -
System: NetBSD taniemarie 1.2_BETA NetBSD 1.2_BETA (SEEBS) #0: Fri Aug 16 17:16:09 CDT 1996 seebs@taniemarie:/usr/src/sys/arch/amiga/compile/SEEBS amiga

	IMHO, it is incorrect for daemon() to be declared in <stdlib.h>.
	I can survive it since it goes away if I #define _POSIX_SOURCE or
	_ANSI_SOURCE, but it shouldn't show up unless asked for.

	If nothing else, it should be in <unistd.h> or some Berkeley
	header, not a Standard C header.

	Try to build procmail.

	My suggestion: move daemon() (and other similar functions) to a
	more correct header reflecting their local and unix-specific nature.
	Or, perhaps cause the compiler's default to be -D_POSIX_SOURCE.  :)

State-Changed-From-To: open->feedback 
State-Changed-By: fair 
State-Changed-When: Wed Aug 12 10:44:57 PDT 1998 
The daemon() declaration is now in the "implementation dependent" section 
of stdlib.h set for !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) 

Is this sufficient to close this PR? 
State-Changed-From-To: feedback->closed 
State-Changed-By: garbled 
State-Changed-When: Mon Jan 4 14:20:45 PST 1999 
This has been fixed in -current. 

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD:,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.