summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Muck <christian.muck@bmw.de>2012-04-20 09:03:13 +0200
committerChristian Muck <christian.muck@bmw.de>2012-05-30 09:05:27 +0200
commit3d2b2381d96db032b1498cd11e30dd6ec032f956 (patch)
tree7d7df3fc5da7f209e7a77ccb27ba2c2244bda50c /src
parentca740dec52d4f0c8bbf99e125eef5941285cd337 (diff)
downloadDLT-daemon-3d2b2381d96db032b1498cd11e30dd6ec032f956.tar.gz
[GDLT-82] Child process inherits file descriptors openend by their parent fixed
Signed-off-by: Christian Muck <christian.muck@bmw.de>
Diffstat (limited to 'src')
-rwxr-xr-xsrc/lib/dlt_user.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/dlt_user.c b/src/lib/dlt_user.c
index 12d87cc..4e32039 100755
--- a/src/lib/dlt_user.c
+++ b/src/lib/dlt_user.c
@@ -163,7 +163,7 @@ int dlt_init(void)
/* return 0; */ /* removed to prevent error, when FIFO already exists */
}
- dlt_user.dlt_user_handle = open(filename, O_RDWR);
+ dlt_user.dlt_user_handle = open(filename, O_RDWR | O_CLOEXEC);
if (dlt_user.dlt_user_handle == -1)
{
sprintf(str,"Loging disabled, FIFO user %s cannot be opened!\n",filename);
@@ -173,7 +173,7 @@ int dlt_init(void)
}
/* open DLT output FIFO */
- dlt_user.dlt_log_handle = open(DLT_USER_FIFO, O_WRONLY | O_NONBLOCK);
+ dlt_user.dlt_log_handle = open(DLT_USER_FIFO, O_WRONLY | O_NONBLOCK | O_CLOEXEC );
if (dlt_user.dlt_log_handle==-1)
{
sprintf(str,"Loging disabled, FIFO %s cannot be opened with open()!\n",DLT_USER_FIFO);