3 ms·
> ... OOM killer nukes it and sh receives only "rm -rf /" If curl was SIGKILLed, wouldn't that result in a "broken pipe", therefore causing the shell to abort?
by humbledrone 12y ago
> ... OOM killer nukes it and sh receives only "rm -rf /"
If curl was SIGKILLed, wouldn't that result in a "broken pipe", therefore causing the shell to abort? The only way the "rm -rf /" would be executed would be if the pipe shut down cleanly and the shell saw an EOF (since obviously there would not be a newline in the scenario you described).
- minaguib 12y agoThe classical "broken pipe" typically occurs when a process is writing to a closed pipe, not reading (which usually gets a vanilla EOF) See my longer reply to tenken for some other scenarios I could think off.