aboutsummaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2006-12-06 17:21:59 +0000
committerWayne Davison <wayned@samba.org>2006-12-06 17:21:59 +0000
commitd365e229678eb7ae758a415d100043f6e07dea35 (patch)
tree53bb0e33a15bbf84801844f7ec2655d5d5729c82 /main.c
parentd02363609a73a62a2c5cfd06f02a7e8babe1bc75 (diff)
downloadandroid_external_rsync-d365e229678eb7ae758a415d100043f6e07dea35.tar.gz
android_external_rsync-d365e229678eb7ae758a415d100043f6e07dea35.tar.bz2
android_external_rsync-d365e229678eb7ae758a415d100043f6e07dea35.zip
The wait_process() call now handles EINTR.
Diffstat (limited to 'main.c')
-rw-r--r--main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/main.c b/main.c
index 0733a9aa..e2d6aa7f 100644
--- a/main.c
+++ b/main.c
@@ -103,7 +103,11 @@ static void show_malloc_stats(void);
* remember_children(), we succeed instead of returning an error. */
pid_t wait_process(pid_t pid, int *status_ptr, int flags)
{
- pid_t waited_pid = waitpid(pid, status_ptr, flags);
+ pid_t waited_pid;
+
+ do {
+ waited_pid = waitpid(pid, status_ptr, flags);
+ } while (waited_pid == -1 && errno == EINTR);
if (waited_pid == -1 && errno == ECHILD) {
/* Status of requested child no longer available: check to