mirror of
https://github.com/transmission/transmission
synced 2025-02-21 13:46:52 +00:00
(trunk daemon) print a warning to stderr when tr_daemon() can't open /dev/null
This commit is contained in:
parent
fea912dd21
commit
0ecee636d7
1 changed files with 2 additions and 0 deletions
|
@ -172,6 +172,8 @@ tr_daemon( int nochdir, int noclose )
|
|||
/* send stdin, stdout, and stderr to /dev/null */
|
||||
int i;
|
||||
int fd = open( "/dev/null", O_RDWR, 0 );
|
||||
if( fd < 0 )
|
||||
fprintf( stderr, "unable to open /dev/null: %s\n", tr_strerror(errno) );
|
||||
for( i=0; i<3; ++i ) {
|
||||
if( close( i ) )
|
||||
return -1;
|
||||
|
|
Loading…
Reference in a new issue