Hi Luiz, >> i don't think it works at all... bluetoothd is still exiting with SIGPIPE. >> i'm a bit lost with fixing this, I tried few methods that were >> suggested here and the only one that actually worked is to ignore the >> signal. >> >> please advise how do you want to proceed with this.. > > We might be better of switching to socketpair instead of pipe2 then, > not only we can fix this problem using MSG_NOSIGNAL but also use > sendmsg and setting auxiliary data which can be used to set things > like the offset. I agree, lets switch to socketpair. I have read up on handling SIGPIPE via signalfd and other means and it is just complicated. Also we should include MSG_NOSIGNAL in all of our code and even switch the simple read/write to it. Regards Marcel