diff options
author | dec05eba <dec05eba@protonmail.com> | 2019-08-09 15:54:44 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2019-08-09 15:55:18 +0200 |
commit | 322513ac417aa7002946a3f203ae1a65f959677a (patch) | |
tree | 95144d28741e79b637159c8ddb1a11fe6accf6ef /include | |
parent | 10fcdec298ccef4971dc6d109222079a0f438004 (diff) |
Wait until mpv process dies (prevent zombie), fix crash that happens sometimes when quiting video
Diffstat (limited to 'include')
-rw-r--r-- | include/Program.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/Program.h b/include/Program.h index 69ee564..6a6d038 100644 --- a/include/Program.h +++ b/include/Program.h @@ -22,6 +22,9 @@ typedef int (*ProgramOutputCallback)(char *data, int size, void *userdata); */ int exec_program(const char **args, ProgramOutputCallback output_callback, void *userdata); +// Return the exit status, or a negative value if waiting failed +int wait_program(pid_t process_id); + /* @args need to have at least 2 arguments. The first which is the program name and the last which is NULL, which indicates end of args |