]> granicus.if.org Git - mutt/commitdiff
Don't fcntl -1. From Brendan.
authorThomas Roessler <roessler@does-not-exist.org>
Tue, 3 Jul 2001 09:50:27 +0000 (09:50 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Tue, 3 Jul 2001 09:50:27 +0000 (09:50 +0000)
mutt_socket.c

index 05a5183c4c8d7bcaa153874e2eb6530c7aa4a3df..5f43fdc81502b936d9557a7760c751a731b85af0 100644 (file)
@@ -420,11 +420,11 @@ int raw_socket_open (CONNECTION* conn)
   for (cur = res; cur != NULL; cur = cur->ai_next)
   {
     fd = socket (cur->ai_family, cur->ai_socktype, cur->ai_protocol);
-    fcntl(fd,F_SETFD,FD_CLOEXEC);
     if (fd >= 0)
     {
       if ((rc = socket_connect (fd, cur->ai_addr)) == 0)
       {
+       fcntl (fd, F_SETFD, FD_CLOEXEC);
        conn->fd = fd;
        break;
       }