Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion library/std/src/sys/process/unix/vxworks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,14 @@ impl Command {
Ok(t) => unsafe {
let mut status = 0 as c_int;
libc::waitpid(t.0.pid, &mut status, 0);
libc::exit(0);
// If the task was killed by a signal, terminate the same way by
// restoring the default disposition and re-raising it.
if libc::WIFSIGNALED(status) {
let signal = libc::WTERMSIG(status);
libc::signal(signal, libc::SIG_DFL);
libc::raise(signal);
Comment thread
clarfonthey marked this conversation as resolved.
Outdated
}
libc::exit(libc::WEXITSTATUS(status));
},
Err(e) => e,
}
Expand Down
Loading