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
This commit is contained in:
Derrick Brashear 2002-01-23 18:49:59 +00:00
parent 2742ca8a8b
commit 271fdc46b1

View File

@ -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;