Subject: standards/2949: daemon() should not be in <stdlib.h>
To: None <gnats-bugs@gnats.netbsd.org>
From: Peter Seebach <seebs@taniemarie.solon.com>
List: netbsd-bugs
Date: 11/17/1996 19:51:46
>Number:         2949
>Category:       standards
>Synopsis:       daemon() should not be in &lt;stdlib.h&gt;
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Nov 17 18:05:00 1996
>Last-Modified:
>Originator:     Peter Seebach
>Organization:
Peter Seebach - seebs@solon.com - 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 - http://www.solon.com/~seebs/c/c-iaq.html
>Release:        1.2
>Environment:
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


>Description:
	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.

>How-To-Repeat:
	Try to build procmail.

>Fix:
	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.  :)

>Audit-Trail:
>Unformatted: