]> granicus.if.org Git - rtmpdump/commitdiff
Child process must exit if exec failed. (exec should never
authorhyc <hyc@400ebc74-4327-4243-bc38-086b20814532>
Thu, 25 Mar 2010 03:08:55 +0000 (03:08 +0000)
committerhyc <hyc@400ebc74-4327-4243-bc38-086b20814532>
Thu, 25 Mar 2010 03:08:55 +0000 (03:08 +0000)
fail unless your PATH is messed up)

git-svn-id: svn://svn.mplayerhq.hu/rtmpdump/trunk@398 400ebc74-4327-4243-bc38-086b20814532

rtmpsrv.c

index 823cde4d2e2734d34e565687b4120d6ab82adc6f..5f980b61e8d7c455854523ac293be09b8000058d 100644 (file)
--- 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
 }