Greetings, I was wondering, why are we setting SIGPIPE to SIG_IGN in initsigs(): static void initsigs(void) { #ifdef SIGPIPE PyOS_setsig(SIGPIPE, SIG_IGN); #endif [...] } One of the side effects is: >>> os.system("yes | read any") yes: standard output: Broken pipe yes: write error 0 >>> os.system("yes | head -1") y yes: standard output: Broken pipe yes: write error 0 That stops when setting to SIG_DFL: >>> signal.signal(signal.SIGPIPE, signal.SIG_DFL) 1 >>> os.system("yes | head -1") y 0 >>> os.system("yes | read any") 0 Out of curiosity, many of the google results for "yes: standard output: Broken pipe" are from Python programs. :-) Regards, -- Gustavo Niemeyer http://niemeyer.net
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4