From 872e579effbf9d9c37a5179eedb441025ce31b70 Mon Sep 17 00:00:00 2001 From: "Michael I. Bushnell" Date: Mon, 26 Jun 1995 19:36:12 +0000 Subject: (fshelp_fetch_root): Wakeup other blocked calls *before* returning errors provided by fshelp_start_translator_long or CALLBACK. --- libfshelp/fetch-root.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'libfshelp') 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; -- cgit v1.2.3