aboutsummaryrefslogtreecommitdiffstats
path: root/src/ChangeLog
diff options
context:
space:
mode:
authorEli Zaretskii2015-03-27 12:44:31 +0300
committerEli Zaretskii2015-03-27 12:44:31 +0300
commitd133cf839421462280ac0bfd9bd84c591f0e0249 (patch)
treed964223f8da827058aece69ed66ca25ba82ebbf4 /src/ChangeLog
parent792d44b3c31d2a682607ab8b79ae7d26b7402f41 (diff)
downloademacs-d133cf839421462280ac0bfd9bd84c591f0e0249.tar.gz
emacs-d133cf839421462280ac0bfd9bd84c591f0e0249.zip
Support non-blocking connect on MS-Windows (Bug#20207)
Based on ideas from Kim F. Storm <storm@cua.dk>, see http://lists.gnu.org/archive/html/emacs-devel/2006-12/msg00873.html. src/w32proc.c (reader_thread): If the FILE_CONNECT flag is set, call '_sys_wait_connect'. If it returns STATUS_CONNECT_FAILED, exit the thread with code 2. (sys_select): Support 'wfds' in addition to 'rfds'. If a descriptor in 'wfds' has its bit set, but the corresponding fd_info member doesn't have its FILE_CONNECT flag set, ignore the descriptor. Otherwise, acknowledge a successful non-blocking connect by resetting the FILE_CONNECT flag and setting cp->status to STATUS_READ_ACKNOWLEDGED. src/w32.h (STATUS_CONNECT_FAILED): New enumeration value. (struct _child_process): New member 'errcode'. (FILE_CONNECT): New flag. (_sys_wait_connect): Add prototype. src/w32.c (pfn_WSAEnumNetworkEvents): New function pointer. (init_winsock): Load WSAEnumNetworkEvents from winsock DLL. (set_errno): Map WSAEWOULDBLOCK and WSAENOTCONN. (sys_connect): Support non-blocking 'connect' calls by setting the FILE_CONNECT flag in the fd_info member and returning EINPROGRESS. (_sys_read_ahead): Add debug message if this function is called for a descriptor that waits for a non-blocking connect to complete. (_sys_wait_connect): New function. (sys_read): Support STATUS_CONNECT_FAILED. Return the error code recorded by _sys_wait_connect when the non-blocking connect failed. Don't call WSAGetLastError before a call to set_errno had a chance to use its value, since WSAGetLastError clears the last error. nt/inc/ms-w32.h (BROKEN_NON_BLOCKING_CONNECT): Don't define.
Diffstat (limited to 'src/ChangeLog')
-rw-r--r--src/ChangeLog35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 632b798ce08..67e04f6f41c 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,38 @@
12015-03-27 Eli Zaretskii <eliz@gnu.org>
2
3 Support non-blocking connect on MS-Windows.
4 Based on ideas from Kim F. Storm <storm@cua.dk>, see
5 http://lists.gnu.org/archive/html/emacs-devel/2006-12/msg00873.html.
6
7 * w32proc.c (reader_thread): If the FILE_CONNECT flag is set, call
8 '_sys_wait_connect'. If it returns STATUS_CONNECT_FAILED, exit
9 the thread with code 2.
10 (sys_select): Support 'wfds' in addition to 'rfds'. If a
11 descriptor in 'wfds' has its bit set, but the corresponding
12 fd_info member doesn't have its FILE_CONNECT flag set, ignore the
13 descriptor. Otherwise, acknowledge a successful non-blocking
14 connect by resetting the FILE_CONNECT flag and setting cp->status
15 to STATUS_READ_ACKNOWLEDGED. (Bug#20207)
16
17 * w32.h (STATUS_CONNECT_FAILED): New enumeration value.
18 (struct _child_process): New member 'errcode'.
19 (FILE_CONNECT): New flag.
20 (_sys_wait_connect): Add prototype.
21
22 * w32.c (pfn_WSAEnumNetworkEvents): New function pointer.
23 (init_winsock): Load WSAEnumNetworkEvents from winsock DLL.
24 (set_errno): Map WSAEWOULDBLOCK and WSAENOTCONN.
25 (sys_connect): Support non-blocking 'connect' calls by setting the
26 FILE_CONNECT flag in the fd_info member and returning EINPROGRESS.
27 (_sys_read_ahead): Add debug message if this function is called
28 for a descriptor that waits for a non-blocking connect to complete.
29 (_sys_wait_connect): New function.
30 (sys_read): Support STATUS_CONNECT_FAILED. Return the error code
31 recorded by _sys_wait_connect when the non-blocking connect
32 failed. Don't call WSAGetLastError before a call to set_errno had
33 a chance to use its value, since WSAGetLastError clears the last
34 error.
35
12015-03-25 Stefan Monnier <monnier@iro.umontreal.ca> 362015-03-25 Stefan Monnier <monnier@iro.umontreal.ca>
2 37
3 * editfns.c (save_excursion_save): Don't save the mark. 38 * editfns.c (save_excursion_save): Don't save the mark.