Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
e333e864
Commit
e333e864
authored
Apr 30, 1994
by
Richard M. Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(Fopen_network_stream): Retry the connect if EADDRINUSE. Ignore EISCONN.
parent
b664e483
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
6 deletions
+16
-6
src/process.c
src/process.c
+16
-6
No files found.
src/process.c
View file @
e333e864
...
...
@@ -1482,6 +1482,7 @@ Fourth arg SERVICE is name of the service desired, or an integer\n\
int
port
;
struct
hostent
host_info_fixed
;
struct
gcpro
gcpro1
,
gcpro2
,
gcpro3
,
gcpro4
;
int
retry
=
0
;
GCPRO4
(
name
,
buffer
,
host
,
service
);
CHECK_STRING
(
name
,
0
);
...
...
@@ -1541,11 +1542,19 @@ Fourth arg SERVICE is name of the service desired, or an integer\n\
unrequest_sigio
();
loop:
if
(
connect
(
s
,
(
struct
sockaddr
*
)
&
address
,
sizeof
address
)
==
-
1
)
if
(
connect
(
s
,
(
struct
sockaddr
*
)
&
address
,
sizeof
address
)
==
-
1
&&
errno
!=
EISCONN
)
{
int
xerrno
=
errno
;
if
(
errno
==
EINTR
)
goto
loop
;
if
(
errno
==
EADDRINUSE
&&
retry
<
20
)
{
retry
++
;
goto
loop
;
}
close
(
s
);
if
(
interrupt_input
)
...
...
@@ -2462,7 +2471,7 @@ Output from processes can arrive in between bunches.")
right away.
If we can, we try to signal PROCESS by sending control characters
down the p
ipe
. This allows us to signal inferiors who have changed
down the p
ty
. This allows us to signal inferiors who have changed
their uid, for which killpg would return an EPERM error. */
static
void
...
...
@@ -2674,7 +2683,7 @@ process_send_signal (process, signo, current_group, nomsg)
DEFUN
(
"interrupt-process"
,
Finterrupt_process
,
Sinterrupt_process
,
0
,
2
,
0
,
"Interrupt process PROCESS. May be process or name of one.
\n
\
PROCESS may be a process, a buffer, or the name of a process or buffer.
\n
\
N
il or no arg means current buffer's process.
\n
\
n
il or no arg means current buffer's process.
\n
\
Second arg CURRENT-GROUP non-nil means send signal to
\n
\
the current process-group of the process's controlling terminal
\n
\
rather than to the process's own process group.
\n
\
...
...
@@ -3188,9 +3197,10 @@ nil means don't delete them until `list-processes' is run.");
DEFVAR_LISP
(
"process-connection-type"
,
&
Vprocess_connection_type
,
"Control type of device used to communicate with subprocesses.
\n
\
Values are nil to use a pipe, and t or 'pty for a pty. Note that if
\n
\
pty's are not available, this variable will be ignored. The value takes
\n
\
effect when `start-process' is called."
);
Values are nil to use a pipe, or t or `pty' to use a pty.
\n
\
The value has no effect if the system has no ptys or if all ptys are busy:
\n
\
then a pipe is used in any case.
\n
\
The value takes effect when `start-process' is called."
);
Vprocess_connection_type
=
Qt
;
defsubr
(
&
Sprocessp
);
...
...
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