commit a7f035f7f85b1314b63fbe05a4165b4d517c75f2
parent f84d461b5560d5675d2a4ce86a040c301b814b51
Author: David Goulet <dgoulet@torproject.org>
Date: Thu, 12 Jun 2025 11:57:27 -0400
Merge branch 'tor-gitlab/mr/910' into maint-0.4.8
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/lib/process/waitpid.c b/src/lib/process/waitpid.c
@@ -1,6 +1,6 @@
/* Copyright (c) 2003-2004, Roger Dingledine
* Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
- * Copyright (c) 2007-2021, The Tor Project, Inc. */
+ * Copyright (c) 2007-2025, The Tor Project, Inc. */
/* See LICENSE for licensing information */
/**
@@ -146,6 +146,7 @@ notify_pending_waitpid_callbacks(void)
int status = 0;
while ((child = waitpid(-1, &status, WNOHANG)) > 0) {
+ status = WIFEXITED(status) ? WEXITSTATUS(status) : -1;
notify_waitpid_callback_by_pid(child, status);
status = 0; /* should be needless */
}