fix deadlock caused by signals interrupting read() (as proposed by velco)
fix deadlock caused by signals interrupting read() (as proposed by velco)


stefanseefeld/fresco,stefanseefeld/fresco,stefanseefeld/fresco,stefanseefeld/fresco,stefanseefeld/fresco