diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2021-04-28 19:19:34 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2021-04-28 19:19:34 -0700 |
commit | 64eed5bc02c0a4e09423aa67f118a2a7c8bc69b0 (patch) | |
tree | 070c3ce47b5da9bd1789beacbf6c555bf3045762 /src/rmd_threads.h | |
parent | 553ff18522bce3151b8290143c7966744c302804 (diff) |
threads: handle pthread_create() errors
This doesn't try to cleanup anything on the failures, basically
assuming they're always fatal and the process will exit.
Previously no pthread_create() errors were noticed at all, which
could result in some very strange failure modes.
Diffstat (limited to 'src/rmd_threads.h')
-rw-r--r-- | src/rmd_threads.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rmd_threads.h b/src/rmd_threads.h index 6ca2dbd..d80985f 100644 --- a/src/rmd_threads.h +++ b/src/rmd_threads.h @@ -30,6 +30,7 @@ #include "rmd_types.h" +int rmdThread(pthread_t *thread, void *(*func)(ProgData *), ProgData *pdata); /** * Launch and wait capture threads. * Also creates and waits the encoding threads when @@ -37,7 +38,7 @@ * * \param pdata ProgData struct containing all program data */ -void rmdThreads(ProgData *pdata); +int rmdThreads(ProgData *pdata); void rmdThreadsSetName(const char *name); |