From 64eed5bc02c0a4e09423aa67f118a2a7c8bc69b0 Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Wed, 28 Apr 2021 19:19:34 -0700 Subject: 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. --- src/rmd_threads.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/rmd_threads.h') 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); -- cgit v1.2.3