rust/src/test
Alex Crichton 0e190b9a4a native: Use WNOHANG before signaling
It turns out that on linux, and possibly other platforms, child processes will
continue to accept signals until they have been *reaped*. This means that once
the child has exited, it will succeed to receive signals until waitpid() has
been invoked on it.

This is unfortunate behavior, and differs from what is seen on OSX and windows.
This commit changes the behavior of Process::signal() to be the same across
platforms, and updates the documentation of Process::kill() to note that when
signaling a foreign process it may accept signals until reaped.

Implementation-wise, this invokes waitpid() with WNOHANG before each signal to
the child to ensure that if the child has exited that we will reap it. Other
possibilities include installing a SIGCHLD signal handler, but at this time I
believe that that's too complicated.

Closes #13124
2014-03-28 11:07:58 -07:00
..
auxiliary Rename Pod into Copy 2014-03-28 10:34:02 +01:00
bench bench: Put the spawn bench back on libgreen 2014-03-26 09:18:49 -07:00
codegen Add pub to all the codegen tests 2013-10-10 06:00:51 -07:00
compile-fail Rename Pod into Copy 2014-03-28 10:34:02 +01:00
debug-info Remove outdated and unnecessary std::vec_ng::Vec imports. 2014-03-22 01:08:57 +11:00
pretty test: Remove Freeze / NoFreeze from tests 2014-03-22 15:47:34 +01:00
run-fail Fix fallout of removing default bounds 2014-03-27 10:14:50 -07:00
run-make rustc: Remove all crate map support 2014-03-24 11:19:28 -07:00
run-pass native: Use WNOHANG before signaling 2014-03-28 11:07:58 -07:00
run-pass-fulldeps test: Automatically remove all ~[T] from tests. 2014-03-21 23:37:21 +11:00