summaryrefslogtreecommitdiff
path: root/lib/libsndio/aucat.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libsndio/aucat.c')
-rw-r--r--lib/libsndio/aucat.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/libsndio/aucat.c b/lib/libsndio/aucat.c
index 7acef2189a2..7936a8319e4 100644
--- a/lib/libsndio/aucat.c
+++ b/lib/libsndio/aucat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aucat.c,v 1.12 2009/02/03 19:44:58 ratchov Exp $ */
+/* $OpenBSD: aucat.c,v 1.13 2009/02/04 07:54:00 ratchov Exp $ */
/*
* Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org>
*
@@ -103,6 +103,10 @@ sio_open_aucat(char *path, unsigned mode, int nbio)
continue;
goto bad_connect;
}
+ if (fcntl(s, F_SETFD, FD_CLOEXEC) < 0) {
+ DPERROR(&hdl->sa, "FD_CLOEXEC");
+ goto bad_connect;
+ }
hdl->fd = s;
hdl->rstate = STATE_IDLE;
hdl->rtodo = 0xdeadbeef;