Mercurial > hg > xemacs-beta
diff src/process-nt.c @ 432:3a7e78e1142d r21-2-24
Import from CVS: tag r21-2-24
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:29:58 +0200 |
parents | a5df635868b2 |
children | 080151679be2 |
line wrap: on
line diff
--- a/src/process-nt.c Mon Aug 13 11:29:10 2007 +0200 +++ b/src/process-nt.c Mon Aug 13 11:29:58 2007 +0200 @@ -658,9 +658,7 @@ kick_status_notify (); } - /* Hack to support Windows 95 negative pids */ - return ((int)pi.dwProcessId < 0 - ? -(int)pi.dwProcessId : (int)pi.dwProcessId); + return ((int)pi.dwProcessId); } } @@ -719,7 +717,8 @@ static void nt_send_process (Lisp_Object proc, struct lstream* lstream) { - struct Lisp_Process *p = XPROCESS (proc); + volatile Lisp_Object vol_proc = proc; + struct Lisp_Process *volatile p = XPROCESS (proc); /* use a reasonable-sized buffer (somewhere around the size of the stream buffer) so as to avoid inundating the stream with blocked @@ -749,7 +748,7 @@ p->core_dumped = 0; p->tick++; process_tick++; - deactivate_process (proc); + deactivate_process (*((Lisp_Object *) (&vol_proc))); error ("Broken pipe error sending to process %s; closed it", XSTRING_DATA (p->name)); } @@ -890,6 +889,12 @@ /* Ok, got an answer */ if (WSAGETASYNCERROR(msg.lParam) == NO_ERROR) success = 1; + else + { + warn_when_safe(Qstream, Qwarning, + "cannot get IP address for host \"%s\"", + XSTRING_DATA (host)); + } goto done; } else if (msg.message == WM_TIMER && msg.wParam == SOCK_TIMER_ID) @@ -980,7 +985,6 @@ retval = connect (s, (struct sockaddr *) &address, sizeof (address)); if (retval != NO_ERROR && WSAGetLastError() != WSAEWOULDBLOCK) goto connect_failed; - /* Wait while connection is established */ while (1) { @@ -1023,6 +1027,10 @@ connect_failed: closesocket (s); + warn_when_safe(Qstream, Qwarning, + "failure to open network stream to host \"%s\" for service \"%s\"", + XSTRING_DATA (host), + XSTRING_DATA (service)); report_file_error ("connection failed", list2 (host, name)); }