Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F152943982
D17035.id47677.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D17035.id47677.diff
View Options
Index: sbin/mdmfs/mdmfs.c
===================================================================
--- sbin/mdmfs/mdmfs.c
+++ sbin/mdmfs/mdmfs.c
@@ -674,8 +674,12 @@
* Run a process with command name and arguments pointed to by the
* formatted string 'cmdline'. Since system(3) is not used, the first
* space-delimited token of 'cmdline' must be the full pathname of the
- * program to run. The return value is the return code of the process
- * spawned. If 'ofd' is non-NULL, it is set to the standard output of
+ * program to run.
+ *
+ * The return value is the return code of the process spawned, or a negative
+ * signal number, if the process exited due to an uncaught signal.
+ *
+ * If 'ofd' is non-NULL, it is set to the standard output of
* the program spawned (i.e., you can read from ofd and get the output
* of the program).
*/
@@ -771,7 +775,12 @@
free(argv);
while (waitpid(pid, &status, 0) != pid)
;
- return (WEXITSTATUS(status));
+ if (WIFEXITED(status))
+ return (WEXITSTATUS(status));
+ else if (WIFSIGNALED(status))
+ return (-WTERMSIG(status));
+ else
+ err(1, "unexpected waitpid status: 0x%x", status);
}
static void
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Apr 19, 5:52 AM (17 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31749499
Default Alt Text
D17035.id47677.diff (1 KB)
Attached To
Mode
D17035: mdmfs(8): Check for other types of helper-program failure
Attached
Detach File
Event Timeline
Log In to Comment