aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar William Orr <will@worrbase.com> 2011-11-18 01:39:27 -0500
committerAvatar Ali Polatel <alip@exherbo.org> 2012-08-13 17:48:34 +0300
commit987e982db186a8c61c352adf9b2a3a6cab4ba027 (patch)
treee976bad6d4eb3048900c0d7f916baa6a5c53ec31
parent2141ed07f350dfad0231c48cba48703eab9549ca (diff)
downloadsydbox-987e982db186a8c61c352adf9b2a3a6cab4ba027.tar.gz
sydbox-987e982db186a8c61c352adf9b2a3a6cab4ba027.tar.xz
Fixed race condition in sydbox
- detach from finished children so that their parents can reap them instead of accidentally reaping them ourselves - Changed error string
-rw-r--r--src/syd-loop.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/syd-loop.c b/src/syd-loop.c
index 51ef125..b3c77d1 100644
--- a/src/syd-loop.c
+++ b/src/syd-loop.c
@@ -144,10 +144,10 @@ static int event_exit(context_t *ctx, pid_t pid, int *code_ptr)
}
resume:
- if (G_UNLIKELY(!pink_trace_resume(pid, 0))) {
+ if (G_UNLIKELY(!pink_trace_detach(pid, 0))) {
if (G_UNLIKELY(ESRCH != errno)) {
- g_critical("failed to resume the dying child %i: %s", pid, g_strerror(errno));
- g_printerr("failed to resume the dying child %i: %s\n", pid, g_strerror(errno));
+ g_critical("failed to detach the dying child %i: %s", pid, g_strerror(errno));
+ g_printerr("failed to detach the dying child %i: %s\n", pid, g_strerror(errno));
exit(-1);
}
}