From 2742ca8a8ba2fe18b1991fc250f0376010303469 Mon Sep 17 00:00:00 2001 From: Omkar Sathe Date: Wed, 23 Jan 2002 18:48:18 +0000 Subject: [PATCH] solaris-wait-for-listenerproc-to-exit-20020123 like linux, actually wait for listenerproc to finish before freeing the socket --- src/rx/SOLARIS/rx_knet.c | 8 ++++++-- src/rx/rx_kcommon.c | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/rx/SOLARIS/rx_knet.c b/src/rx/SOLARIS/rx_knet.c index d884bfc52..f09e1c421 100644 --- a/src/rx/SOLARIS/rx_knet.c +++ b/src/rx/SOLARIS/rx_knet.c @@ -281,8 +281,10 @@ int osi_FreeSocket(asocket) vnode_t *vp = SOTOV(so); AFS_STATCNT(osi_FreeSocket); - if (rxk_ListenerPid) + if (rxk_ListenerPid) { kill(rxk_ListenerPid, SIGUSR1); + afs_osi_Sleep(&rxk_ListenerPid); + } return 0; } @@ -512,8 +514,10 @@ int osi_FreeSocket(asocket) TIUSER *udp_tiptr = (TIUSER *) asocket; AFS_STATCNT(osi_FreeSocket); - if (rxk_ListenerPid) + if (rxk_ListenerPid) { kill(rxk_ListenerPid, SIGUSR1); + afs_osi_Sleep(&rxk_ListenerPid); + } return 0; } diff --git a/src/rx/rx_kcommon.c b/src/rx/rx_kcommon.c index a3e3ac6aa..8a2756f44 100644 --- a/src/rx/rx_kcommon.c +++ b/src/rx/rx_kcommon.c @@ -1056,7 +1056,7 @@ void rxk_Listener(void) afs_osi_Wakeup(&afs_termState); } rxk_ListenerPid = 0; -#ifdef AFS_LINUX24_ENV +#if defined(AFS_LINUX22_ENV) || defined(AFS_SUN5_ENV) afs_osi_Wakeup(&rxk_ListenerPid); #endif #ifdef AFS_SUN5_ENV -- 2.39.5