Newsgroups: comp.sys.isis Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!batcomputer!cornell!ken From: ken@cs.cornell.edu (Ken Birman) Subject: work-around for SUN OS problem, not needed on other systems Message-ID: <1991Jun11.162529.5530@cs.cornell.edu> Originator: ken@turing3.cs.cornell.edu Sender: news@cs.cornell.edu (USENET news user) Nntp-Posting-Host: turing3.cs.cornell.edu Organization: Cornell Univ. CS Dept, Ithaca NY 14853 Date: Tue, 11 Jun 1991 16:25:29 GMT Lines: 37 The following seems to be a useable work-around for the SUN OS problem mentioned above, namely a failure to detect client termination using the SIGPIPE method. In protos/pr_client.c, add the following at the end of client_init.c, right after the listen() system call: # if (SUN) { void client_check(); (void)timeout(10000, client_check, 0); } # endif Now, after the procedure called client_lookup add the following new code: /* Only needed on SUN OS */ void check_clients() { #ifdef SUN register sd; (void)timeout(10000, check_clients, 0); for(sd = 0; sd < max_cl; sd++) if(cl[sd].cl_pid > 0 && kill(cl[sd].cl_pid, SIGIO) == -1 && errno == ESRCH) client_failed(sd, TRUE); #endif SUN } Rebuild protos with this change, and within 10 seconds after a program that uses ISIS has terminated, the system should notice. Obviously, detection will be faster if the SIGPIPE occurs normally. -- Kenneth P. Birman E-mail: ken@cs.cornell.edu 4105 Upson Hall, Dept. of Computer Science TEL: 607 255-9199 (office) Cornell University Ithaca, NY 14853 (USA) FAX: 607 255-4428