Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!snorkelwacker.mit.edu!stanford.edu!msi.umn.edu!slevy From: slevy@s1.msi.umn.edu (Stuart Levy) Newsgroups: comp.sys.sgi Subject: Re: Newsreaders... Summary: SGI [r]rn patch Message-ID: <1991May18.195036.5755@s1.msi.umn.edu> Date: 18 May 91 19:50:36 GMT References: <1991May16.161042.11782@news.iastate.edu> Sender: slevy@geom.umn.edu Distribution: na Organization: Minnesota Supercomputer Institute Lines: 48 In article <1991May16.161042.11782@news.iastate.edu> bryan@pi.eai.iastate.edu (Bryan Manske) writes: >In Article #9295 damc@dap.csiro.au (Don McCormick) writes: > >>Reading of news articles using rn is not a problem, but if you try to >>reply to an article or save an article on some occasions you can drop >>out of rn with the error. > >> "Unexpected close of server socket" > >>Does anyone have a solution to this problem? Besides the ``#define vfork fork'' fix already mentioned, SGI [r]rn users might want to apply this patch to rn/term.c: *** /tmp/,RCSt1a09955 Sat May 18 14:12:50 1991 --- term.c Wed Apr 10 21:29:31 1991 *************** *** 607,613 **** return 1; } else { ! size = read(0,addr,size); #ifdef RAWONLY *addr &= 0177; #endif --- 608,618 ---- return 1; } else { ! int got = read(0,addr,size); ! if(got < 0) { ! while((got = read(0,addr,size)) < 0 && errno == EINTR) ! ; ! } #ifdef RAWONLY *addr &= 0177; #endif It ignores spurious terminal read errors, which the SGI tty driver seems to return even on unsatisfied single-byte reads when returning from caught signals. If [r]rn dies when you resume after ^Z, try this. Also it's worth changing the set of libraries from "-lcurses -lbsd" to "-lcurses -lsun -lbsd -lc_s". -lsun (if you have it) supplies yellow pages, so ~username works on YP systems. -lc_s just shrinks the binary a bit. Stuart Levy, Geometry Center, University of Minnesota slevy@geom.umn.edu