Processing (Linux): don't hang on waitpid(2)

This commit is contained in:
李通洲 committed 2023-07-10 15:26:10 +08:00
1 parent 856d732e13
commit e611ce5733
1 file changed
+1 -1
+1 -1
View File
@@ -75,7 +75,7 @@ const char* ffProcessAppendStdErr(FFstrbuf* buffer, char* const argv[])
int FF_AUTO_CLOSE_FD childPipeFd = pipes[0];
int status = -1;
if(waitpid(childPid, &status, 0) < 0)
if(waitpid(childPid, &status, WNOHANG) < 0)
return "waitpid(childPid, &status, 0) failed";
if (!WIFEXITED(status))