diff options
author | Richard M. Stallman <rms@gnu.org> | 1993-12-24 03:49:30 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1993-12-24 03:49:30 +0000 |
commit | 457a9beedefeab952ad28f9705ffb21ce5b77479 (patch) | |
tree | ce64eea44f767e22a031242ff7decbeee214208f /src/process.c | |
parent | 913126a6bce839632ff1a92fd2f09afaa1c4fcea (diff) | |
download | emacs-457a9beedefeab952ad28f9705ffb21ce5b77479.tar.gz |
(Fopen_network_stream): Turn off SIGIO while connecting.
Diffstat (limited to 'src/process.c')
-rw-r--r-- | src/process.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/process.c b/src/process.c index 5d798786171..107bc05d28a 100644 --- a/src/process.c +++ b/src/process.c @@ -1446,6 +1446,15 @@ Fourth arg SERVICE is name of the service desired, or an integer\n\ if (s < 0) 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: 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\ if (errno == EINTR) goto loop; close (s); + + if (interrupt_input) + request_sigio (); + errno = xerrno; report_file_error ("connection failed", Fcons (host, Fcons (name, Qnil))); } + + if (interrupt_input) + request_sigio (); + #else /* TERM */ s = connect_server (0); if (s < 0) |