git.videolan.org
/
vlc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c3131c0
)
Fix error handling
author
Rémi Denis-Courmont
<rem@videolan.org>
Mon, 17 Dec 2007 16:16:53 +0000
(16:16 +0000)
committer
Rémi Denis-Courmont
<rem@videolan.org>
Mon, 17 Dec 2007 16:16:53 +0000
(16:16 +0000)
modules/misc/screensaver.c
patch
|
blob
|
history
diff --git
a/modules/misc/screensaver.c
b/modules/misc/screensaver.c
index
5523981
..
3e0093b
100644
(file)
--- a/
modules/misc/screensaver.c
+++ b/
modules/misc/screensaver.c
@@
-148,9
+148,9
@@
static void Execute( intf_thread_t *p_this, const char *const *ppsz_args )
pthread_sigmask (SIG_SETMASK, &set, NULL);
/* We don't want output */
- freopen( "/dev/null", "w", stdout );
- freopen( "/dev/null", "w", stderr );
- execv( ppsz_args[0] , (char *const *)ppsz_args );
+ if( ( freopen( "/dev/null", "w", stdout ) != NULL )
+ && ( freopen( "/dev/null", "w", stderr ) != NULL ) )
+
execv( ppsz_args[0] , (char *const *)ppsz_args );
/* If the file we want to execute doesn't exist we exit() */
exit( EXIT_FAILURE );
}