-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: process the final pipe input event before closing (#8)
In the event that poll returned both POLLIN and POLLHUP in a single pass we were mistakenly closing the file descriptor without processing that final input. This was addressed by changing the condition for ending the loop. Also expanded the midline-flush test to run 10 times because that's what was most effective in demonstrating the problem.
- Loading branch information
1 parent
5b71242
commit 7d5f5c5
Showing
5 changed files
with
39 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
-- tests/midline-flush | ||
-- sh -c 'for i in `seq 1 10`; do tests/midline-flush; done' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,10 @@ | ||
Hello, stderr! Goodbye, stderr! | ||
Hello, stderr! Goodbye, stderr! | ||
Hello, stderr! Goodbye, stderr! | ||
Hello, stderr! Goodbye, stderr! | ||
Hello, stderr! Goodbye, stderr! | ||
Hello, stderr! Goodbye, stderr! | ||
Hello, stderr! Goodbye, stderr! | ||
Hello, stderr! Goodbye, stderr! | ||
Hello, stderr! Goodbye, stderr! | ||
Hello, stderr! Goodbye, stderr! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,20 @@ | ||
[36m[0m[1m[33mHello, stderr! Goodbye, stderr![0m | ||
[36m[0mHello, stdout! Goodbye, stdout![0m | ||
[36m[0m[1m[33mHello, stderr! Goodbye, stderr![0m | ||
[36m[0mHello, stdout! Goodbye, stdout![0m | ||
[36m[0m[1m[33mHello, stderr! Goodbye, stderr![0m | ||
[36m[0mHello, stdout! Goodbye, stdout![0m | ||
[36m[0m[1m[33mHello, stderr! Goodbye, stderr![0m | ||
[36m[0mHello, stdout! Goodbye, stdout![0m | ||
[36m[0m[1m[33mHello, stderr! Goodbye, stderr![0m | ||
[36m[0mHello, stdout! Goodbye, stdout![0m | ||
[36m[0m[1m[33mHello, stderr! Goodbye, stderr![0m | ||
[36m[0mHello, stdout! Goodbye, stdout![0m | ||
[36m[0m[1m[33mHello, stderr! Goodbye, stderr![0m | ||
[36m[0mHello, stdout! Goodbye, stdout![0m | ||
[36m[0m[1m[33mHello, stderr! Goodbye, stderr![0m | ||
[36m[0mHello, stdout! Goodbye, stdout![0m | ||
[36m[0m[1m[33mHello, stderr! Goodbye, stderr![0m | ||
[36m[0mHello, stdout! Goodbye, stdout![0m | ||
[36m[0m[1m[33mHello, stderr! Goodbye, stderr![0m | ||
[36m[0mHello, stdout! Goodbye, stdout![0m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,10 @@ | ||
Hello, stdout! Goodbye, stdout! | ||
Hello, stdout! Goodbye, stdout! | ||
Hello, stdout! Goodbye, stdout! | ||
Hello, stdout! Goodbye, stdout! | ||
Hello, stdout! Goodbye, stdout! | ||
Hello, stdout! Goodbye, stdout! | ||
Hello, stdout! Goodbye, stdout! | ||
Hello, stdout! Goodbye, stdout! | ||
Hello, stdout! Goodbye, stdout! | ||
Hello, stdout! Goodbye, stdout! |