Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
54fe2541
Commit
54fe2541
authored
Oct 31, 2019
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Treat OpenBSD like Linux, i.e., use MSG_NOSIGNAL
parent
8114fae3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
14 deletions
+9
-14
libcaf_io/src/native_socket.cpp
libcaf_io/src/native_socket.cpp
+9
-14
No files found.
libcaf_io/src/native_socket.cpp
View file @
54fe2541
...
...
@@ -92,24 +92,19 @@ namespace network {
const
int
ec_interrupted_syscall
=
EINTR
;
#endif
// platform-dependent SIGPIPE setup
#if defined(CAF_MACOS) || defined(CAF_IOS) || defined(CAF_BSD)
// Use the socket option but no flags to recv/send on macOS/iOS/BSD.
// (OpenBSD doesn't have SO_NOSIGPIPE)
#ifndef __OpenBSD__
// Platform-dependent setup for supressing SIGPIPE.
#if defined(CAF_MACOS) || defined(CAF_IOS) || defined(__FreeBSD__)
// Set the SO_NOSIGPIPE socket option on macOS, iOS and FreeBSD.
const
int
no_sigpipe_socket_flag
=
SO_NOSIGPIPE
;
#else
const
int
no_sigpipe_socket_flag
=
0
;
#endif
const
int
no_sigpipe_io_flag
=
0
;
#elif defined(CAF_WINDOWS)
// Do nothing on Windows (SIGPIPE does not exist).
const
int
no_sigpipe_socket_flag
=
0
;
const
int
no_sigpipe_io_flag
=
0
;
// Do nothing on Windows (SIGPIPE does not exist).
const
int
no_sigpipe_socket_flag
=
0
;
const
int
no_sigpipe_io_flag
=
0
;
#else
// Use flags to recv/send on Linux/Android but no socket option
.
const
int
no_sigpipe_socket_flag
=
0
;
const
int
no_sigpipe_io_flag
=
MSG_NOSIGNAL
;
// Pass MSG_NOSIGNAL to recv/send on Linux/Android/OpenBSD
.
const
int
no_sigpipe_socket_flag
=
0
;
const
int
no_sigpipe_io_flag
=
MSG_NOSIGNAL
;
#endif
#ifndef CAF_WINDOWS
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment