summaryrefslogtreecommitdiff
path: root/usr.bin/aucat
diff options
context:
space:
mode:
authorAlexandre Ratchov <ratchov@cvs.openbsd.org>2009-02-04 08:00:34 +0000
committerAlexandre Ratchov <ratchov@cvs.openbsd.org>2009-02-04 08:00:34 +0000
commitdeaef39c57e0bee6c4450718402784d5c2bbd013 (patch)
treeb122e5cfc1bb786bb327019590d33f61653084f3 /usr.bin/aucat
parent752dad93074b9984d993ab27180dce08400b8e45 (diff)
daemonize when in server mode, suggested by many
ok jakemsr
Diffstat (limited to 'usr.bin/aucat')
-rw-r--r--usr.bin/aucat/aucat.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/aucat/aucat.c b/usr.bin/aucat/aucat.c
index ba86b9d9a9c..5ae6ea236bb 100644
--- a/usr.bin/aucat/aucat.c
+++ b/usr.bin/aucat/aucat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aucat.c,v 1.55 2009/02/03 19:44:58 ratchov Exp $ */
+/* $OpenBSD: aucat.c,v 1.56 2009/02/04 08:00:33 ratchov Exp $ */
/*
* Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org>
*
@@ -557,6 +557,10 @@ main(int argc, char **argv)
MIDI_TO_ADATA(fa->vol));
free(fa);
}
+ if (l_flag && debug_level == 0) {
+ if (daemon(0, 0) < 0)
+ err(1, "daemon");
+ }
/*
* loop, start audio