* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
- if(socketpair(AF_UNIX, SOCK_STREAM, 0, _sockets) != 0)
+ if (socketpair(AF_UNIX, SOCK_STREAM, 0, sockets_) != 0)
- read(_sockets[1], &sig_number, sizeof(int));
+ if (read(sockets_[1], &sig_number, sizeof(int)) != sizeof(int)) {
+ qDebug() << "Failed to catch signal";
+ abort();
+ }
- write(_sockets[0], &sig_number, sizeof(int));
+ if (write(sockets_[0], &sig_number, sizeof(int)) != sizeof(int)) {
+ // Failed to handle signal
+ abort();
+ }