aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-01-07 23:05:20 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-01-08 00:18:36 +0100
commitfc5a905a6d0c76d9fb8d838ac83f6219a7a5e20f (patch)
tree699af040db38fdc3b7a37959dd24b20b88752b58
parent2d6f317d7183d043dafecc7ec76f5ec5bcb07bf9 (diff)
downloadffmpeg-fc5a905a6d0c76d9fb8d838ac83f6219a7a5e20f.tar.gz
ffserver: check chdir() return
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--ffserver.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ffserver.c b/ffserver.c
index 5ee5c32483..80a36c7b0c 100644
--- a/ffserver.c
+++ b/ffserver.c
@@ -499,7 +499,10 @@ static void start_children(FFStream *feed)
}
/* This is needed to make relative pathnames work */
- chdir(my_program_dir);
+ if (chdir(my_program_dir) < 0) {
+ http_log("chdir failed\n");
+ exit(1);
+ }
signal(SIGPIPE, SIG_DFL);