mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 05:42:29 +00:00
Overhaul process spawning
This commit is contained in:
parent
99dc1281f5
commit
26e254fb4d
96 changed files with 1848 additions and 1541 deletions
|
@ -57,6 +57,17 @@ TEST(write, badMemory_efault) {
|
|||
ASSERT_SYS(EFAULT, -1, write(1, (void *)1, 1));
|
||||
}
|
||||
|
||||
TEST(write, brokenPipe_raisesSigpipe) {
|
||||
int fds[2];
|
||||
SPAWN(fork);
|
||||
signal(SIGPIPE, SIG_DFL);
|
||||
ASSERT_SYS(0, 0, pipe(fds));
|
||||
ASSERT_SYS(0, 1, write(4, "x", 1));
|
||||
ASSERT_SYS(0, 0, close(3));
|
||||
write(4, "x", 1);
|
||||
TERMS(SIGPIPE);
|
||||
}
|
||||
|
||||
TEST(write, brokenPipe_sigpipeIgnored_returnsEpipe) {
|
||||
int fds[2];
|
||||
SPAWN(fork);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue