aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Schwab2011-05-01 10:52:17 +0200
committerAndreas Schwab2011-05-01 10:52:17 +0200
commite7a6747fd320eebb898353dae1829d3b4e1d4bfa (patch)
tree80664d7aaca92ef8536a8b92c9b0c098601ad245
parent1ef14cb4b0f726a5e6a86e20fed8cfecb22c67d5 (diff)
downloademacs-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.
-rw-r--r--src/ChangeLog6
-rw-r--r--src/sysdep.c33
2 files changed, 23 insertions, 16 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 13f40887329..a88419f0b11 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
12011-05-01 Andreas Schwab <schwab@linux-m68k.org>
2
3 * sysdep.c (wait_for_termination_1): Make static.
4 (wait_for_termination, interruptible_wait_for_termination): Move
5 after wait_for_termination_1.
6
12011-05-01 Lars Magne Ingebrigtsen <larsi@gnus.org> 72011-05-01 Lars Magne Ingebrigtsen <larsi@gnus.org>
2 8
3 * sysdep.c (interruptible_wait_for_termination): New function 9 * sysdep.c (interruptible_wait_for_termination): New function
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)
296int wait_debugging EXTERNALLY_VISIBLE; 296int 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
302void 300static void
303wait_for_termination (int pid)
304{
305 wait_for_termination_1 (pid, 0);
306}
307
308/* Like the above, but allow keyboard interruption. */
309void
310interruptible_wait_for_termination (int pid)
311{
312 wait_for_termination_1 (pid, 1);
313}
314
315void
316wait_for_termination_1 (int pid, int interruptible) 301wait_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
348void
349wait_for_termination (int pid)
350{
351 wait_for_termination_1 (pid, 0);
352}
353
354/* Like the above, but allow keyboard interruption. */
355void
356interruptible_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)