summaryrefslogtreecommitdiff
path: root/src/core/wee-network.c
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2011-10-23 12:07:30 +0200
committerSebastien Helleu <flashcode@flashtux.org>2011-10-23 12:07:30 +0200
commit71bef80ce2c6dfc944972fcc93b3db46fcffb283 (patch)
treeca5483a5e7b3ba5ccf5da9e944a0e236ab991a4f /src/core/wee-network.c
parent60e88df4f2b36dfe4169157b2541004102c51b05 (diff)
downloadweechat-71bef80ce2c6dfc944972fcc93b3db46fcffb283.zip
core: enable background process under Cygwin to connect to servers, fix reconnection problem (bug #34626)
The connection was not made with a fork() under Cygwin because the connect() in child process was not working. This seems to be fixed in latest Cygwin, so this hack has been removed and now a fork() is done for all systems.
Diffstat (limited to 'src/core/wee-network.c')
-rw-r--r--src/core/wee-network.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/src/core/wee-network.c b/src/core/wee-network.c
index 7cb018132..e226c57b6 100644
--- a/src/core/wee-network.c
+++ b/src/core/wee-network.c
@@ -1030,9 +1030,7 @@ network_connect_with_fork (struct t_hook *hook_connect)
int rc;
const char *pos_error;
#endif
-#ifndef __CYGWIN__
pid_t pid;
-#endif
#ifdef HAVE_GNUTLS
/* initialize GnuTLS if SSL asked */
@@ -1080,15 +1078,6 @@ network_connect_with_fork (struct t_hook *hook_connect)
HOOK_CONNECT(hook_connect, child_read) = child_pipe[0];
HOOK_CONNECT(hook_connect, child_write) = child_pipe[1];
-#ifdef __CYGWIN__
- /*
- * connection may block under Cygwin, there's no other known way
- * to do better today, since connect() in child process seems not to work
- * any suggestion is welcome to improve that!
- */
- network_connect_child (hook_connect);
- network_connect_child_read_cb (hook_connect, 0);
-#else
switch (pid = fork ())
{
/* fork failed */
@@ -1115,5 +1104,4 @@ network_connect_with_fork (struct t_hook *hook_connect)
1, 0, 0,
&network_connect_child_read_cb,
hook_connect);
-#endif
}