[FFmpeg-cvslog] ffserver: check chdir() return
Michael Niedermayer
git at videolan.org
Sun Jan 8 00:30:38 CET 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Jan 7 23:05:20 2012 +0100| [fc5a905a6d0c76d9fb8d838ac83f6219a7a5e20f] | committer: Michael Niedermayer
ffserver: check chdir() return
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fc5a905a6d0c76d9fb8d838ac83f6219a7a5e20f
---
ffserver.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/ffserver.c b/ffserver.c
index 5ee5c32..80a36c7 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);
More information about the ffmpeg-cvslog
mailing list