process::exec: using appropriate exit code on vxworks.#158549
Conversation
|
r? @clarfonthey rustbot has assigned @clarfonthey. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
Should this also forward signals? You can use |
|
cc @biabbas @hax0kartik as the vxworks maintainers. Agree that this should probably forward signals. |
|
r=me with the new changes, assuming they work on vxworks. Would prefer to wait for at least someone to verify that (doesn't have to be one of the maintainers I pinged) before merging, but if there aren't any objections for a few days, I'll probably just merge anyway. |
| if libc::WIFSIGNALED(status) { | ||
| let signal = libc::WTERMSIG(status); | ||
| libc::signal(signal, libc::SIG_DFL); | ||
| libc::raise(signal); |
There was a problem hiding this comment.
Maybe put an abort right after the raise? Also I think I was wrong with raise, rather kill(getpid(), signal) should be used. raise sends the signal to the current thread rather than the entire process. Maybe unmasking the signal also makes sense, though sudo at least doesn't do this: https://github.com/sudo-project/sudo/blob/d3698715833c24d7e8a27b3685f6cba1d9d38899/src/sudo.c#L318-L325
There was a problem hiding this comment.
(Also fine handing off review to you on this one if you'd like to take over. I don't mind doing it either, just, wanted to be clear I'm fine with you handling it if you want.)
No description provided.