Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
649dbf36
Commit
649dbf36
authored
Mar 26, 2010
by
Chong Yidong
Browse files
* process.c (Fmake_network_process): Don't apply Bug#5173 fix for Windows.
parent
cad4261f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
13 deletions
+27
-13
src/ChangeLog
src/ChangeLog
+5
-0
src/process.c
src/process.c
+22
-13
No files found.
src/ChangeLog
View file @
649dbf36
2010-03-27 Chong Yidong <cyd@stupidchicken.com>
* process.c (Fmake_network_process): Don't apply Bug#5173 fix for
Windows.
2010-03-25 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
* process.c (Fmake_network_process): Don't call turn_on_atimers around
...
...
src/process.c
View file @
649dbf36
...
...
@@ -3534,6 +3534,8 @@ usage: (make-network-process &rest ARGS) */)
{
int
optn
,
optbits
;
retry_connect:
s
=
socket
(
lres
->
ai_family
,
lres
->
ai_socktype
,
lres
->
ai_protocol
);
if
(
s
<
0
)
{
...
...
@@ -3636,12 +3638,14 @@ usage: (make-network-process &rest ARGS) */)
#endif
#endif
#endif
#ifndef WINDOWSNT
if
(
xerrno
==
EINTR
)
{
/* Unlike most other syscalls connect() cannot be called
again. (That would return EALREADY.) The proper way to
wait for completion is select(). */
int sc;
int
sc
,
len
;
SELECT_TYPE
fdset
;
retry_select:
FD_ZERO
(
&
fdset
);
...
...
@@ -3651,23 +3655,23 @@ usage: (make-network-process &rest ARGS) */)
(
EMACS_TIME
*
)
0
);
if
(
sc
==
-
1
)
{
if (errno == EINTR)
if
(
errno
==
EINTR
)
goto
retry_select
;
else
else
report_file_error
(
"select failed"
,
Qnil
);
}
eassert
(
sc
>
0
);
{
int len = sizeof xerrno;
eassert (FD_ISSET (s, &fdset));
if (getsockopt (s, SOL_SOCKET, SO_ERROR, &xerrno, &len) == -1)
report_file_error ("getsockopt failed", Qnil);
if (xerrno != 0)
errno = xerrno, report_file_error ("error during connect", Qnil);
else
break;
}
len
=
sizeof
xerrno
;
eassert
(
FD_ISSET
(
s
,
&
fdset
));
if
(
getsockopt
(
s
,
SOL_SOCKET
,
SO_ERROR
,
&
xerrno
,
&
len
)
==
-
1
)
report_file_error
(
"getsockopt failed"
,
Qnil
);
if
(
xerrno
)
errno
=
xerrno
,
report_file_error
(
"error during connect"
,
Qnil
);
else
break
;
}
#endif
/* !WINDOWSNT */
immediate_quit
=
0
;
...
...
@@ -3675,6 +3679,11 @@ usage: (make-network-process &rest ARGS) */)
specpdl_ptr
=
specpdl
+
count1
;
emacs_close
(
s
);
s
=
-
1
;
#ifdef WINDOWSNT
if
(
xerrno
==
EINTR
)
goto
retry_connect
;
#endif
}
if
(
s
>=
0
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment