mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 20:20:07 +00:00
Cross-platform fix: OS X now deprecates the use of the daemon(3) API.
(closes issue #11908) Reported by: oej Patches: 20080204__bug11908.diff.txt uploaded by Corydon76 (license 14) Tested by: Corydon76 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@102323 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -680,8 +680,14 @@ int main(int argc, char *argv[])
|
||||
fclose(astf);
|
||||
exit(1);
|
||||
}
|
||||
if (needfork)
|
||||
if (needfork) {
|
||||
#ifndef HAVE_SBIN_LAUNCHD
|
||||
daemon(0,0);
|
||||
#else
|
||||
fprintf(stderr, "Mac OS X detected. Use 'launchd -d muted -f' to launch.\n");
|
||||
exit(1);
|
||||
#endif
|
||||
}
|
||||
for(;;) {
|
||||
if (wait_event()) {
|
||||
fclose(astf);
|
||||
|
Reference in New Issue
Block a user