summaryrefslogtreecommitdiffstatshomepage
path: root/tests/unix/ffi_float2.py
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2017-05-01 18:47:26 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2017-05-01 18:47:26 +0300
commit11bc21dfa8f087ae2d95f378267ef270a85029ad (patch)
treeeb485b4091e69586825c7d7b51fe39a5ddd04858 /tests/unix/ffi_float2.py
parent5db55e63f3e7a5beda732c241693e37e3a7b099f (diff)
downloadmicropython-11bc21dfa8f087ae2d95f378267ef270a85029ad.tar.gz
micropython-11bc21dfa8f087ae2d95f378267ef270a85029ad.zip
unix/main: Ignore SIGPIPE signal, instead make EPIPE arrive.
Do not raise SIGPIPE, instead return EPIPE. Otherwise, e.g. writing to peer-closed socket will lead to sudden termination of MicroPython process. SIGPIPE is particularly nasty, because unix shell doesn't print anything for it, so the above looks like completely sudden and silent termination for unknown reason. Ignoring SIGPIPE is also what CPython does. Note that this may lead to problems using MicroPython scripts as pipe filters, but again, that's what CPython does. So, scripts which want to follow unix shell pipe semantics (where SIGPIPE means "pipe was requested to terminate, it's not an error"), should catch EPIPE themselves.
Diffstat (limited to 'tests/unix/ffi_float2.py')
0 files changed, 0 insertions, 0 deletions