Commit Graph

12 Commits (master)

Author SHA1 Message Date
Leah Neukirchen 66d0eff12f style 7 years ago
Leah Neukirchen 13db67713f filter: use a non-blocking write pipe 7 years ago
Leah Neukirchen 6b5b42f583 filter: don't write more than PIPE_BUF at once
This could result in stalling during big writes when we can't read the
output of the child in the mean time.
7 years ago
Leah Neukirchen ad9fe95761 filter: simplify clean up logic 7 years ago
Leah Neukirchen 9e49cf7561 filter: use sigpending/sigismember/sigwait instead of sigtimedwait
sigtimedwait is just POSIX.1-2001, which lesser operating systems don't
implement completely.
7 years ago
Leah Neukirchen b78cf918db filter: use sigtimedwait with zero wait time
Else it will block until SIGPIPE comes.
7 years ago
Leah Neukirchen 6fae889a13 filter: block SIGPIPE during filtering 7 years ago
Leah Neukirchen 9e8e0d38c9 filter: free buffer on failure 7 years ago
Leah Neukirchen a27ba3370c filter: make more robust
MacOS will send POLLIN for empty reads on EOF, so detect ret == 0 too.
Also poll for POLLHUP, which other systems use to message EOF.

Fixes #18.
7 years ago
Leah Neukirchen 2b4e3aa66d clean up whitespace 7 years ago
Christian Neukirchen 65b277df16 filter: slay warning 8 years ago
Christian Neukirchen be2ca1ba42 mshow: actually filter the parts 8 years ago