diff options
author | Lassi Marttala <lassi.lm.marttala@partner.bmw.de> | 2012-05-30 11:56:22 +0200 |
---|---|---|
committer | Christian Muck <christian.muck@bmw.de> | 2012-06-13 23:52:40 +0200 |
commit | bea4e475456745f444e2451415366d0e283f835c (patch) | |
tree | b9a84d2fbf19784f1b33f5c59f5d664b3d8b8dc4 /src/system/dlt-system-process-handling.c | |
parent | f8f80a07afd45d60c2975bfd7e4b859fb8c10a96 (diff) | |
download | DLT-daemon-bea4e475456745f444e2451415366d0e283f835c.tar.gz |
dlt-system: Logging of error conditions. Assert memory allocations.
dlt-system: logfile module would sometimes deadlock in the end of a
file because of feof() reset in the end of the file.
Signed-off-by: Christian Muck <christian.muck@bmw.de>
Diffstat (limited to 'src/system/dlt-system-process-handling.c')
-rw-r--r-- | src/system/dlt-system-process-handling.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/system/dlt-system-process-handling.c b/src/system/dlt-system-process-handling.c index 30568f1..3837d35 100644 --- a/src/system/dlt-system-process-handling.c +++ b/src/system/dlt-system-process-handling.c @@ -80,9 +80,9 @@ int daemonize() for(i = getdtablesize(); i >= 0; i--) close(i); - int fd = i=open("/dev/null",O_RDWR); + int fd = open("/dev/null",O_RDWR); - if(fd < 0 || dup(i) < 0 || dup(i) < 0) + if(fd < 0 || dup(fd) < 0 || dup(fd) < 0) return -1; /** |