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
457a9bee
Commit
457a9bee
authored
Dec 24, 1993
by
Richard M. Stallman
Browse files
(Fopen_network_stream): Turn off SIGIO while connecting.
parent
913126a6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
src/process.c
src/process.c
+17
-0
No files found.
src/process.c
View file @
457a9bee
...
@@ -1446,6 +1446,15 @@ Fourth arg SERVICE is name of the service desired, or an integer\n\
...
@@ -1446,6 +1446,15 @@ Fourth arg SERVICE is name of the service desired, or an integer\n\
if
(
s
<
0
)
if
(
s
<
0
)
report_file_error
(
"error creating socket"
,
Fcons
(
name
,
Qnil
));
report_file_error
(
"error creating socket"
,
Fcons
(
name
,
Qnil
));
/* Kernel bugs (on Ultrix at least) cause lossage (not just EINTR)
when connect is interrupted. So let's not let it get interrupted.
Note we do not turn off polling, because polling is only used
when not interrupt_input, and thus not normally used on the systems
which have this bug. On systems which use polling, there's no way
to quit if polling is turned off. */
if
(
interrupt_input
)
unrequest_sigio
();
loop:
loop:
if
(
connect
(
s
,
(
struct
sockaddr
*
)
&
address
,
sizeof
address
)
==
-
1
)
if
(
connect
(
s
,
(
struct
sockaddr
*
)
&
address
,
sizeof
address
)
==
-
1
)
{
{
...
@@ -1453,10 +1462,18 @@ Fourth arg SERVICE is name of the service desired, or an integer\n\
...
@@ -1453,10 +1462,18 @@ Fourth arg SERVICE is name of the service desired, or an integer\n\
if
(
errno
==
EINTR
)
if
(
errno
==
EINTR
)
goto
loop
;
goto
loop
;
close
(
s
);
close
(
s
);
if
(
interrupt_input
)
request_sigio
();
errno
=
xerrno
;
errno
=
xerrno
;
report_file_error
(
"connection failed"
,
report_file_error
(
"connection failed"
,
Fcons
(
host
,
Fcons
(
name
,
Qnil
)));
Fcons
(
host
,
Fcons
(
name
,
Qnil
)));
}
}
if
(
interrupt_input
)
request_sigio
();
#else
/* TERM */
#else
/* TERM */
s
=
connect_server
(
0
);
s
=
connect_server
(
0
);
if
(
s
<
0
)
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