diff options
Diffstat (limited to 'src/sysdep.c')
| -rw-r--r-- | src/sysdep.c | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/src/sysdep.c b/src/sysdep.c index 9a7045f3610..ea9a25cc6e7 100644 --- a/src/sysdep.c +++ b/src/sysdep.c | |||
| @@ -296,23 +296,8 @@ init_baud_rate (int fd) | |||
| 296 | int wait_debugging EXTERNALLY_VISIBLE; | 296 | int wait_debugging EXTERNALLY_VISIBLE; |
| 297 | 297 | ||
| 298 | #ifndef MSDOS | 298 | #ifndef MSDOS |
| 299 | /* Wait for subprocess with process id `pid' to terminate and | ||
| 300 | make sure it will get eliminated (not remain forever as a zombie) */ | ||
| 301 | 299 | ||
| 302 | void | 300 | static void |
| 303 | wait_for_termination (int pid) | ||
| 304 | { | ||
| 305 | wait_for_termination_1 (pid, 0); | ||
| 306 | } | ||
| 307 | |||
| 308 | /* Like the above, but allow keyboard interruption. */ | ||
| 309 | void | ||
| 310 | interruptible_wait_for_termination (int pid) | ||
| 311 | { | ||
| 312 | wait_for_termination_1 (pid, 1); | ||
| 313 | } | ||
| 314 | |||
| 315 | void | ||
| 316 | wait_for_termination_1 (int pid, int interruptible) | 301 | wait_for_termination_1 (int pid, int interruptible) |
| 317 | { | 302 | { |
| 318 | while (1) | 303 | while (1) |
| @@ -357,6 +342,22 @@ wait_for_termination_1 (int pid, int interruptible) | |||
| 357 | } | 342 | } |
| 358 | } | 343 | } |
| 359 | 344 | ||
| 345 | /* Wait for subprocess with process id `pid' to terminate and | ||
| 346 | make sure it will get eliminated (not remain forever as a zombie) */ | ||
| 347 | |||
| 348 | void | ||
| 349 | wait_for_termination (int pid) | ||
| 350 | { | ||
| 351 | wait_for_termination_1 (pid, 0); | ||
| 352 | } | ||
| 353 | |||
| 354 | /* Like the above, but allow keyboard interruption. */ | ||
| 355 | void | ||
| 356 | interruptible_wait_for_termination (int pid) | ||
| 357 | { | ||
| 358 | wait_for_termination_1 (pid, 1); | ||
| 359 | } | ||
| 360 | |||
| 360 | /* | 361 | /* |
| 361 | * flush any pending output | 362 | * flush any pending output |
| 362 | * (may flush input as well; it does not matter the way we use it) | 363 | * (may flush input as well; it does not matter the way we use it) |