summaryrefslogtreecommitdiff
path: root/src/rmd.c
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2021-04-28 19:19:34 -0700
committerVito Caputo <vcaputo@pengaru.com>2021-04-28 19:19:34 -0700
commit64eed5bc02c0a4e09423aa67f118a2a7c8bc69b0 (patch)
tree070c3ce47b5da9bd1789beacbf6c555bf3045762 /src/rmd.c
parent553ff18522bce3151b8290143c7966744c302804 (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.c')
-rw-r--r--src/rmd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rmd.c b/src/rmd.c
index 64addd4..b3a1af2 100644
--- a/src/rmd.c
+++ b/src/rmd.c
@@ -150,7 +150,8 @@ int main(int argc, char **argv)
}
//this is where the capturing happens.
- rmdThreads(&pdata);
+ if (rmdThreads(&pdata))
+ return 1;
XCloseDisplay(pdata.dpy);
fprintf(stderr, ".\n");
© All Rights Reserved