mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 08:41:03 +00:00
Ignore SIGPIPE
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@14592 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
ad2b110fc5
commit
6c1e49239f
3 changed files with 18 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2002-09-27 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
|
* Source/GSTcpPort.m: ([GSTcphandle+initialize]) ignore SIGPIPE in
|
||||||
|
case a socket gets closed while we are writing.
|
||||||
|
|
||||||
2002-09-26 Richard Frith-Macdonald <rfm@gnu.org>
|
2002-09-26 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
* Source/Additions/GSMime.m: Fix typo.
|
* Source/Additions/GSMime.m: Fix typo.
|
||||||
|
|
|
@ -41,7 +41,12 @@
|
||||||
#include <Foundation/NSDebug.h>
|
#include <Foundation/NSDebug.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#ifdef HAVE_SYS_SIGNAL_H
|
||||||
|
#include <sys/signal.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_SIGNAL_H
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
#endif
|
||||||
#ifdef HAVE_UNISTD_H
|
#ifdef HAVE_UNISTD_H
|
||||||
#include <unistd.h> /* for gethostname() */
|
#include <unistd.h> /* for gethostname() */
|
||||||
#endif
|
#endif
|
||||||
|
@ -66,7 +71,6 @@
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <sys/resource.h>
|
#include <sys/resource.h>
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
#include <signal.h>
|
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <sys/file.h>
|
#include <sys/file.h>
|
||||||
/*
|
/*
|
||||||
|
@ -443,6 +447,12 @@ static Class runLoopClass;
|
||||||
|
|
||||||
wVersionRequested = MAKEWORD(2, 0);
|
wVersionRequested = MAKEWORD(2, 0);
|
||||||
WSAStartup(wVersionRequested, &wsaData);
|
WSAStartup(wVersionRequested, &wsaData);
|
||||||
|
#else
|
||||||
|
/*
|
||||||
|
* If SIGPIPE is not ignored, we will abort on any attempt to
|
||||||
|
* write to a pipe/socket that has been closed by the other end!
|
||||||
|
*/
|
||||||
|
signal(SIGPIPE, SIG_IGN);
|
||||||
#endif
|
#endif
|
||||||
mutableArrayClass = [NSMutableArray class];
|
mutableArrayClass = [NSMutableArray class];
|
||||||
mutableDataClass = [NSMutableData class];
|
mutableDataClass = [NSMutableData class];
|
||||||
|
|
|
@ -198,8 +198,8 @@ getAddr(NSString* name, NSString* svc, NSString* pcl, struct sockaddr_in *sin)
|
||||||
{
|
{
|
||||||
#if !defined(__MINGW__)
|
#if !defined(__MINGW__)
|
||||||
/*
|
/*
|
||||||
* If SIGPIPE is not ignored, we will abort on any attempt to
|
* If SIGPIPE is not ignored, we will abort on any attempt to
|
||||||
* write to a pipe/socket that has been closed by the other end!
|
* write to a pipe/socket that has been closed by the other end!
|
||||||
*/
|
*/
|
||||||
signal(SIGPIPE, SIG_IGN);
|
signal(SIGPIPE, SIG_IGN);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue