Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/librumpuser Cleanup server socket before sending back "o...
details: https://anonhg.NetBSD.org/src/rev/40e17bf9e0ca
branches: trunk
changeset: 762099:40e17bf9e0ca
user: pooka <pooka%NetBSD.org@localhost>
date: Tue Feb 15 16:10:41 2011 +0000
description:
Cleanup server socket before sending back "ok" for halt. Fixes
some occasionally-seen race conditions in tests which do server
restarts (e.g. the raidframe tests).
diffstat:
lib/librumpuser/rumpuser_sp.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diffs (37 lines):
diff -r 7f02c6e31a27 -r 40e17bf9e0ca lib/librumpuser/rumpuser_sp.c
--- a/lib/librumpuser/rumpuser_sp.c Tue Feb 15 15:57:33 2011 +0000
+++ b/lib/librumpuser/rumpuser_sp.c Tue Feb 15 16:10:41 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rumpuser_sp.c,v 1.41 2011/02/15 10:37:07 pooka Exp $ */
+/* $NetBSD: rumpuser_sp.c,v 1.42 2011/02/15 16:10:41 pooka Exp $ */
/*
* Copyright (c) 2010, 2011 Antti Kantee. All Rights Reserved.
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: rumpuser_sp.c,v 1.41 2011/02/15 10:37:07 pooka Exp $");
+__RCSID("$NetBSD: rumpuser_sp.c,v 1.42 2011/02/15 16:10:41 pooka Exp $");
#include <sys/types.h>
#include <sys/atomic.h>
@@ -1191,6 +1191,10 @@
struct spclient *spc = arg;
register_t retval[2] = {0, 0};
+ if (spclist[0].spc_fd) {
+ parsetab[cleanupidx].cleanup(cleanupsa);
+ }
+
/*
* stuff response into the socket, since this process is just
* about to exit
@@ -1199,7 +1203,6 @@
send_syscall_resp(spc, spc->spc_syscallreq, 0, retval);
if (spclist[0].spc_fd) {
- parsetab[cleanupidx].cleanup(cleanupsa);
shutdown(spclist[0].spc_fd, SHUT_RDWR);
spfini = 1;
}
Home |
Main Index |
Thread Index |
Old Index