diff options
Diffstat (limited to 'pflocal/pflocal.c')
-rw-r--r-- | pflocal/pflocal.c | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/pflocal/pflocal.c b/pflocal/pflocal.c index 56ec622a..27148bd6 100644 --- a/pflocal/pflocal.c +++ b/pflocal/pflocal.c @@ -108,25 +108,21 @@ trivfs_modify_stat (struct trivfs_protid *cred, struct stat *st) error_t trivfs_goaway (struct trivfs_control *fsys, int flags) { - error_t err; - - /* Stop all I/O. */ - ports_inhibit_bucket_rpcs (pf_port_bucket); + int force = (flags & FSYS_GOAWAY_FORCE); + error_t err = ports_inhibit_bucket_rpcs (pf_port_bucket); /* Stop all I/O. */ - /* Now see if there are any old sockets lying around. */ - err = sock_global_shutdown (); + if (err == 0 || (err != EINTR && force)) + { + /* Now see if there are any old sockets lying around. */ + err = sock_global_shutdown (); - /* Exit if not, or if we must. */ - if (err == 0 || flags & FSYS_GOAWAY_FORCE) - exit (0); + /* Exit if not, or if we must. */ + if (err == 0 || force) + exit (0); - /* We won't go away, so start things going again... */ - ports_resume_bucket_rpcs (pf_port_bucket); + /* We won't go away, so start things going again... */ + ports_resume_bucket_rpcs (pf_port_bucket); + } return err; } - -void -thread_cancel (thread_t foo __attribute__ ((unused))) -{ -} |