summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorTilghman Lesher <tilghman@meg.abyt.es>2008-02-04 21:15:18 +0000
committerTilghman Lesher <tilghman@meg.abyt.es>2008-02-04 21:15:18 +0000
commit1dc86caf303467d2e50493fd48b3b1db4c999c73 (patch)
tree33a06d2f7dd1a19383907720d259ca2e315f3a56 /utils
parent668cecbafc0299f3e3fa50f4130546acd7e5898a (diff)
Merged revisions 102323 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r102323 | tilghman | 2008-02-04 15:06:09 -0600 (Mon, 04 Feb 2008) | 7 lines 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/trunk@102329 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'utils')
-rw-r--r--utils/muted.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/utils/muted.c b/utils/muted.c
index 6a32b6d99..4a4d4b7e9 100644
--- a/utils/muted.c
+++ b/utils/muted.c
@@ -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);