summaryrefslogtreecommitdiff
path: root/libfshelp/fetch-root.c
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1995-06-26 19:36:12 +0000
committerMichael I. Bushnell <mib@gnu.org>1995-06-26 19:36:12 +0000
commit872e579effbf9d9c37a5179eedb441025ce31b70 (patch)
tree62a0885e7d519eec4648a23b90232e7faa72e445 /libfshelp/fetch-root.c
parentd33bde2cedb3d50ae6871dd48c4c73272f04e1b3 (diff)
(fshelp_fetch_root): Wakeup other blocked calls *before* returning
errors provided by fshelp_start_translator_long or CALLBACK.
Diffstat (limited to 'libfshelp/fetch-root.c')
-rw-r--r--libfshelp/fetch-root.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/libfshelp/fetch-root.c b/libfshelp/fetch-root.c
index f865a06f..3c149e02 100644
--- a/libfshelp/fetch-root.c
+++ b/libfshelp/fetch-root.c
@@ -90,7 +90,7 @@ fshelp_fetch_root (struct transbox *box, void *cookie,
err = (*callback) (box->cookie, cookie, &underlying, &uid,
&gid, &argz, &argz_len);
if (err)
- return err;
+ goto return_error;
ourauth = getauth ();
uidarray[0] = uidarray[1] = uid;
@@ -123,11 +123,8 @@ fshelp_fetch_root (struct transbox *box, void *cookie,
mutex_lock (box->lock);
free (argz);
-
- if (err)
- return err;
-
- box->active = control;
+
+ return_error:
box->flags &= ~TRANSBOX_STARTING;
if (box->flags & TRANSBOX_WANTED)
@@ -135,6 +132,11 @@ fshelp_fetch_root (struct transbox *box, void *cookie,
box->flags &= ~TRANSBOX_WANTED;
condition_broadcast (&box->wakeup);
}
+
+ if (err)
+ return err;
+
+ box->active = control;
}
control = box->active;