diff options
| author | Andreas Schwab | 2011-05-01 10:52:17 +0200 |
|---|---|---|
| committer | Andreas Schwab | 2011-05-01 10:52:17 +0200 |
| commit | e7a6747fd320eebb898353dae1829d3b4e1d4bfa (patch) | |
| tree | 80664d7aaca92ef8536a8b92c9b0c098601ad245 /src/sysdep.c | |
| parent | 1ef14cb4b0f726a5e6a86e20fed8cfecb22c67d5 (diff) | |
| download | emacs-e7a6747fd320eebb898353dae1829d3b4e1d4bfa.tar.gz emacs-e7a6747fd320eebb898353dae1829d3b4e1d4bfa.zip | |
* src/sysdep.c (wait_for_termination_1): Make static.
(wait_for_termination, interruptible_wait_for_termination): Move
after wait_for_termination_1.
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) |