author | viric@llimona |
Fri, 13 Apr 2007 20:50:31 +0200 | |
changeset 125 | b60f173b1489 |
parent 102 | 27b0f0e44de8 |
child 138 | 00461b7bdf4b |
permissions | -rw-r--r-- |
/* Task Spooler - a task queue system for the unix user Copyright (C) 2007 LluĂs Batlle i Rossell Please find the license in the provided COPYING file. */ #include <signal.h> #include <stdlib.h> /* for NULL */ /* Some externs refer to this variable */ static sigset_t normal_sigmask; void ignore_sigpipe() { sigset_t set; sigemptyset(&set); sigaddset(&set, SIGPIPE); sigprocmask(SIG_BLOCK, &set, &normal_sigmask); } void restore_sigmask() { sigprocmask(SIG_SETMASK, &normal_sigmask, NULL); }