From 4226a60bb0aa407c145593aa10daba13f10e3861 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Sat, 27 Jan 1996 17:39:58 +0000 Subject: (trivfs_goaway): Handle errors from ports_inhibit_bucket_rpcs. --- trans/fifo.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'trans') diff --git a/trans/fifo.c b/trans/fifo.c index 72f48042..e3317593 100644 --- a/trans/fifo.c +++ b/trans/fifo.c @@ -1,6 +1,6 @@ /* A translator for fifos - Copyright (C) 1995 Free Software Foundation, Inc. + Copyright (C) 1995, 1996 Free Software Foundation, Inc. Written by Miles Bader @@ -313,11 +313,15 @@ trivfs_modify_stat (struct trivfs_protid *cred, struct stat *st) error_t trivfs_goaway (struct trivfs_control *cntl, int flags) { + error_t err; + int force = (flags & FSYS_GOAWAY_FORCE); struct port_bucket *bucket = ((struct port_info *)cntl)->bucket; - ports_inhibit_bucket_rpcs (bucket); - if (ports_count_class (cntl->protid_class) > 0 - && !(flags & FSYS_GOAWAY_FORCE)) + err = ports_inhibit_bucket_rpcs (bucket); + if (err == EINTR || (err && !force)) + return err; + + if (ports_count_class (cntl->protid_class) > 0 && !force) /* Still some opens, and we're not being forced to go away, so don't. */ { ports_enable_class (cntl->protid_class); @@ -325,7 +329,7 @@ trivfs_goaway (struct trivfs_control *cntl, int flags) return EBUSY; } - exit(0); + exit (0); } /* ---------------------------------------------------------------- */ -- cgit v1.2.3