Browse Source

Fix for SIGPIPE on OSX.

tags/1.9.7
Stéphane LETZ 15 years ago
parent
commit
71d040c011
3 changed files with 14 additions and 1 deletions
  1. +7
    -0
      macosx/Jackdmp.xcodeproj/project.pbxproj
  2. +1
    -1
      posix/JackSocket.cpp
  3. +6
    -0
      posix/JackSocketServerChannel.cpp

+ 7
- 0
macosx/Jackdmp.xcodeproj/project.pbxproj View File

@@ -5542,7 +5542,14 @@
isa = PBXProject;
buildConfigurationList = 4B699DD5097D427F00A18468 /* Build configuration list for PBXProject "Jackdmp" */;
compatibilityVersion = "Xcode 2.4";
developmentRegion = English;
hasScannedForEncodings = 1;
knownRegions = (
English,
Japanese,
French,
German,
);
mainGroup = 08FB7794FE84155DC02AAC07 /* JackServer */;
projectDirPath = "";
projectRoot = "";


+ 1
- 1
posix/JackSocket.cpp View File

@@ -129,7 +129,7 @@ int JackClientSocket::Connect(const char* dir, const char* name, int which) // A
}

#ifdef __APPLE__
int on = 1 ;
int on = 1;
if (setsockopt(fSocket, SOL_SOCKET, SO_NOSIGPIPE, (const char*)&on, sizeof(on)) < 0) {
jack_log("setsockopt SO_NOSIGPIPE fd = %ld err = %s", fSocket, strerror(errno));
}


+ 6
- 0
posix/JackSocketServerChannel.cpp View File

@@ -110,6 +110,12 @@ void JackSocketServerChannel::ClientAdd(int fd, char* name, int pid, int uuid, i
if (*result == 0) {
fSocketTable[fd].first = refnum;
fRebuild = true;
#ifdef __APPLE__
int on = 1;
if (setsockopt(fd, SOL_SOCKET, SO_NOSIGPIPE, (const char*)&on, sizeof(on)) < 0) {
jack_log("setsockopt SO_NOSIGPIPE fd = %ld err = %s", fd, strerror(errno));
}
#endif
} else {
jack_error("Cannot create new client");
}


Loading…
Cancel
Save