From 6fbf4260e7d9ec301cebba8493db6e721fcfb51d Mon Sep 17 00:00:00 2001 From: hyc Date: Thu, 25 Mar 2010 03:08:55 +0000 Subject: [PATCH] Child process must exit if exec failed. (exec should never fail unless your PATH is messed up) git-svn-id: svn://svn.mplayerhq.hu/rtmpdump/trunk@398 400ebc74-4327-4243-bc38-086b20814532 --- rtmpsrv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rtmpsrv.c b/rtmpsrv.c index 823cde4..5f980b6 100644 --- a/rtmpsrv.c +++ b/rtmpsrv.c @@ -348,7 +348,8 @@ spawn_dumper(int argc, AVal *av, char *cmd) argv[i][av[i].av_len] = '\0'; } argv[i] = NULL; - execvp(argv[0], argv); + if ((i = execvp(argv[0], argv))) + _exit(i); } #endif } -- 2.40.0