From 271fdc46b1cb0b25896618b10e436d33dc04fbf2 Mon Sep 17 00:00:00 2001 From: Derrick Brashear Date: Wed, 23 Jan 2002 18:49:59 +0000 Subject: [PATCH] linux-use-while-loop-and-also-do-it-for-22-waiting-to-close-socket-20020123 while loop idea from chas@cmf.nrl.navy.mil reminder that we should worry about 2.2 from somkar@in.ibm.com --- src/rx/LINUX/rx_knet.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/rx/LINUX/rx_knet.c b/src/rx/LINUX/rx_knet.c index ccc3447a95..7379c22e67 100644 --- a/src/rx/LINUX/rx_knet.c +++ b/src/rx/LINUX/rx_knet.c @@ -178,14 +178,9 @@ void osi_StopListener(void) extern int (*sys_killp)(); extern int rxk_ListenerPid; - if (rxk_ListenerPid) { + while (rxk_ListenerPid) { (void) (*sys_killp)(rxk_ListenerPid, 9); -#ifdef AFS_LINUX24_ENV - afs_osi_Sleep(&rxk_ListenerPid); /* get an event */ - afs_osi_Sleep(&rxk_ListenerPid); /* actually sleep */ -#else - rxk_ListenerPid = 0; -#endif + afs_osi_Sleep(&rxk_ListenerPid); } sock_release(rx_socket); rx_socket = NULL;