mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
fix for ignoring of sigpipe.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@18244 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
34fcca39c1
commit
7fce9c8ad0
2 changed files with 13 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
|||
2003-12-01 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSObject.m: Fix error setting sigpipe handling where
|
||||
sigaction is available.
|
||||
|
||||
2003-11-30 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSNumber.m: Raise exception if user code incorrectly tries
|
||||
|
|
|
@ -877,11 +877,16 @@ GSDescriptionForClassMethod(pcl self, SEL aSel)
|
|||
{
|
||||
struct sigaction act;
|
||||
|
||||
if (sigaction(SIGPIPE, 0, &act) == 0 && act.sa_handler == SIG_DFL)
|
||||
if (sigaction(SIGPIPE, 0, &act) == 0)
|
||||
{
|
||||
if (sigaction(SIGPIPE, &act, 0) != 0)
|
||||
if (act.sa_handler == SIG_DFL)
|
||||
{
|
||||
fprintf(stderr, "Unable to ignore SIGPIPE\n");
|
||||
// Not ignored or handled ... so we ignore it.
|
||||
act.sa_handler = SIG_IGN;
|
||||
if (sigaction(SIGPIPE, &act, 0) != 0)
|
||||
{
|
||||
fprintf(stderr, "Unable to ignore SIGPIPE\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue