ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/Unix/ether_unix.cpp
(Generate patch)

Comparing BasiliskII/src/Unix/ether_unix.cpp (file contents):
Revision 1.29 by gbeauche, 2006-04-02T21:06:50Z vs.
Revision 1.30 by gbeauche, 2007-11-03T11:31:36Z

# Line 47 | Line 47
47   #include <semaphore.h>
48   #include <errno.h>
49   #include <stdio.h>
50 + #include <signal.h>
51   #include <map>
52  
53   #if defined(__FreeBSD__) || defined(sgi) || (defined(__APPLE__) && defined(__MACH__))
# Line 248 | Line 249 | bool ether_init(void)
249          else
250                  net_if_type = NET_IF_SHEEPNET;
251  
252 +        // Don't raise SIGPIPE, let errno be set to EPIPE
253 +        struct sigaction sigpipe_sa;
254 +        if (sigaction(SIGPIPE, NULL, &sigpipe_sa) == 0) {
255 +                assert(sigpipe_sa.sa_handler == SIG_DFL || sigpipe_sa.sa_handler == SIG_IGN);
256 +                sigfillset(&sigpipe_sa.sa_mask);
257 +                sigpipe_sa.sa_flags = 0;
258 +                sigpipe_sa.sa_handler = SIG_IGN;
259 +                sigaction(SIGPIPE, &sigpipe_sa, NULL);
260 +        }
261 +
262   #ifdef HAVE_SLIRP
263          // Initialize slirp library
264          if (net_if_type == NET_IF_SLIRP) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines