Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

maintenance

  • Loading branch information...
commit 1e98cb461ab4520a27ab9d8c32ac1220c40e2989 1 parent 96b71cf
@Neverlord Neverlord authored
View
1  src/ipv4_acceptor.cpp
@@ -46,7 +46,6 @@
# include <sys/socket.h>
# include <netinet/in.h>
# include <netinet/tcp.h>
-# include <fcntl.h>
#endif
namespace cppa { namespace detail {
View
1  src/ipv4_io_stream.cpp
@@ -45,7 +45,6 @@
# include <sys/socket.h>
# include <netinet/in.h>
# include <netinet/tcp.h>
-# include <fcntl.h>
#endif
namespace cppa { namespace detail {
View
11 src/network_manager.cpp
@@ -30,7 +30,6 @@
#include <cstdio>
#include <thread>
-#include <fcntl.h>
#include <cstdint>
#include <cstring> // strerror
#include <unistd.h>
@@ -44,6 +43,7 @@
#include "cppa/intrusive/single_reader_queue.hpp"
+#include "cppa/detail/fd_util.hpp"
#include "cppa/detail/middleman.hpp"
#include "cppa/detail/network_manager.hpp"
@@ -65,14 +65,7 @@ struct network_manager_impl : network_manager {
}
// store pipe read handle in local variables for lambda expression
int pipe_fd0 = pipe_fd[0];
- // set read handle to nonblocking
- auto flags = fcntl(pipe_fd0, F_GETFL, 0);
- if (flags == -1) {
- throw network_error("unable to read socket flags");
- }
- if (fcntl(pipe_fd0, F_SETFL, flags | O_NONBLOCK) < 0) {
- CPPA_CRITICAL("unable to set pipe read handle to nonblock");
- }
+ fd_util::nonblocking(pipe_fd0, true);
// start threads
m_middleman_thread = std::thread([this, pipe_fd0] {
middleman_loop(pipe_fd0, this->m_middleman_queue);
View
1  src/unicast_network.cpp
@@ -37,7 +37,6 @@
#include <iostream>
#include <stdexcept>
-#include <fcntl.h>
#include <netinet/tcp.h>
#include "cppa/cppa.hpp"
Please sign in to comment.
Something went wrong with that request. Please try again.