/[emacs]/emacs/src/process.c
ViewVC logotype

Diff of /emacs/src/process.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.358 by kfstorm, Mon Mar 18 14:09:57 2002 UTC revision 1.359 by pj, Mon Mar 18 18:21:25 2002 UTC
# Line 4207  wait_reading_process_input (time_limit, Line 4207  wait_reading_process_input (time_limit,
4207            if (check_connect && FD_ISSET (channel, &Connecting))            if (check_connect && FD_ISSET (channel, &Connecting))
4208              {              {
4209                struct Lisp_Process *p;                struct Lisp_Process *p;
               struct sockaddr pname;  
               int pnamelen = sizeof(pname);  
4210    
4211                FD_CLR (channel, &connect_wait_mask);                FD_CLR (channel, &connect_wait_mask);
4212                if (--num_pending_connects < 0)                if (--num_pending_connects < 0)
# Line 4229  wait_reading_process_input (time_limit, Line 4227  wait_reading_process_input (time_limit,
4227                    xerrno = errno;                    xerrno = errno;
4228                }                }
4229  #else  #else
4230                /* If connection failed, getpeername will fail.  */                {
4231                xerrno = 0;                  struct sockaddr pname;
4232                if (getpeername(channel, &pname, &pnamelen) < 0)                  int pnamelen = sizeof(pname);
4233                  {  
4234                    /* Obtain connect failure code through error slippage.  */                  /* If connection failed, getpeername will fail.  */
4235                    char dummy;                  xerrno = 0;
4236                    xerrno = errno;                  if (getpeername(channel, &pname, &pnamelen) < 0)
4237                    if (errno == ENOTCONN && read(channel, &dummy, 1) < 0)                    {
4238                        /* Obtain connect failure code through error slippage.  */
4239                        char dummy;
4240                      xerrno = errno;                      xerrno = errno;
4241                  }                      if (errno == ENOTCONN && read(channel, &dummy, 1) < 0)
4242                          xerrno = errno;
4243                      }
4244                  }
4245  #endif  #endif
4246                if (xerrno)                if (xerrno)
4247                  {                  {

Legend:
Removed from v.1.358  
changed lines
  Added in v.1.359

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26