aboutsummaryrefslogtreecommitdiffstats
path: root/src/sysdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sysdep.c')
-rw-r--r--src/sysdep.c33
1 files changed, 7 insertions, 26 deletions
diff --git a/src/sysdep.c b/src/sysdep.c
index aa9d0f38c3c..7c5c144fa8c 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -289,10 +289,6 @@ wait_for_termination_1 (pid_t pid, int interruptible)
289{ 289{
290 while (1) 290 while (1)
291 { 291 {
292#ifdef WINDOWSNT
293 wait (0);
294 break;
295#else /* not WINDOWSNT */
296 int status; 292 int status;
297 int wait_result = waitpid (pid, &status, 0); 293 int wait_result = waitpid (pid, &status, 0);
298 if (wait_result < 0) 294 if (wait_result < 0)
@@ -306,7 +302,8 @@ wait_for_termination_1 (pid_t pid, int interruptible)
306 break; 302 break;
307 } 303 }
308 304
309#endif /* not WINDOWSNT */ 305 /* Note: the MS-Windows emulation of waitpid calls QUIT
306 internally. */
310 if (interruptible) 307 if (interruptible)
311 QUIT; 308 QUIT;
312 } 309 }
@@ -1039,8 +1036,7 @@ init_sys_modes (struct tty_display_info *tty_out)
1039#endif 1036#endif
1040#endif 1037#endif
1041 1038
1042#ifdef F_SETFL 1039#ifdef F_GETOWN
1043#ifdef F_GETOWN /* F_SETFL does not imply existence of F_GETOWN */
1044 if (interrupt_input) 1040 if (interrupt_input)
1045 { 1041 {
1046 old_fcntl_owner[fileno (tty_out->input)] = 1042 old_fcntl_owner[fileno (tty_out->input)] =
@@ -1058,7 +1054,6 @@ init_sys_modes (struct tty_display_info *tty_out)
1058#endif /* HAVE_GPM */ 1054#endif /* HAVE_GPM */
1059 } 1055 }
1060#endif /* F_GETOWN */ 1056#endif /* F_GETOWN */
1061#endif /* F_SETFL */
1062 1057
1063#ifdef _IOFBF 1058#ifdef _IOFBF
1064 /* This symbol is defined on recent USG systems. 1059 /* This symbol is defined on recent USG systems.
@@ -1278,8 +1273,8 @@ reset_sys_modes (struct tty_display_info *tty_out)
1278 fsync (fileno (tty_out->output)); 1273 fsync (fileno (tty_out->output));
1279#endif 1274#endif
1280 1275
1281#ifdef F_SETFL 1276#ifndef DOS_NT
1282#ifdef F_SETOWN /* F_SETFL does not imply existence of F_SETOWN */ 1277#ifdef F_SETOWN
1283 if (interrupt_input) 1278 if (interrupt_input)
1284 { 1279 {
1285 reset_sigio (fileno (tty_out->input)); 1280 reset_sigio (fileno (tty_out->input));
@@ -1287,11 +1282,9 @@ reset_sys_modes (struct tty_display_info *tty_out)
1287 old_fcntl_owner[fileno (tty_out->input)]); 1282 old_fcntl_owner[fileno (tty_out->input)]);
1288 } 1283 }
1289#endif /* F_SETOWN */ 1284#endif /* F_SETOWN */
1290#ifdef O_NDELAY
1291 fcntl (fileno (tty_out->input), F_SETFL, 1285 fcntl (fileno (tty_out->input), F_SETFL,
1292 fcntl (fileno (tty_out->input), F_GETFL, 0) & ~O_NDELAY); 1286 fcntl (fileno (tty_out->input), F_GETFL, 0) & ~O_NONBLOCK);
1293#endif 1287#endif
1294#endif /* F_SETFL */
1295 1288
1296 if (tty_out->old_tty) 1289 if (tty_out->old_tty)
1297 while (emacs_set_tty (fileno (tty_out->input), 1290 while (emacs_set_tty (fileno (tty_out->input),
@@ -2380,19 +2373,7 @@ safe_strsignal (int code)
2380int 2373int
2381serial_open (char *port) 2374serial_open (char *port)
2382{ 2375{
2383 int fd = -1; 2376 int fd = emacs_open (port, O_RDWR | O_NOCTTY | O_NONBLOCK, 0);
2384
2385 fd = emacs_open ((char*) port,
2386 O_RDWR
2387#ifdef O_NONBLOCK
2388 | O_NONBLOCK
2389#else
2390 | O_NDELAY
2391#endif
2392#ifdef O_NOCTTY
2393 | O_NOCTTY
2394#endif
2395 , 0);
2396 if (fd < 0) 2377 if (fd < 0)
2397 { 2378 {
2398 error ("Could not open %s: %s", 2379 error ("Could not open %s: %s",