damc@dap.csiro.au (Don McCormick) (05/16/91)
I have compiled and installed rn on our 4D/220 machine as a news client to a SUN file server. When the rn command is run it takes up to 25 seconds before any newsgroup can be read (approx 6 seconds on BSD machines), this can be quite anoying when using the rn -c command in a .login file as it slows down the login process. 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" I have compiled rn and inews using the flag -D_BSD_COMPAT but still get the same intermittent problem. Does anyone have a solution to this problem? ----------------------------------------------------------------------------- Don McCormick, * PHONE: + 61 2 413 7751 CSIRO Division of Applied Physics, * ARPA: damc@dap.csiro.au PO Box 218, * ACSNET: damc@natmlab.dap.oz Lindfield, NSW, 2070. * UUCP: .....!uunet!dap.csiro.au!damc Australia. * -----------------------------------------------------------------------------
scotts@qsp.COM (Scott Simpers) (05/17/91)
In article <1991May16.031949.29942@syd.dms.CSIRO.AU> 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" > >I have compiled rn and inews using the flag -D_BSD_COMPAT but still get the >same intermittent problem. > >Does anyone have a solution to this problem? I just recently ran across that problem. I was working with 'trn', but I'm reasonably sure the problem is the same. Here's the deal: When you try to save or reply, trn (and I assume rn) fork another process to do the work. This is done using vfork(). Unfortunately, sgi vfork() doesn't work properly. The sub-process closes all file descriptors it doesn't need (i.e. 3 up). THIS CLOSES THEM IN THE PARENT TOO! vfork() does not properly separate the client and server file descriptors. The solution is to go into the configuration for 'rn' and tell it to use fork(), not vfork(). Scott Simpers Quality Software Products voice: (213)410-0303 5711 W Slauson Avenue Suite 240 fax: (213)410-0124 Culver City, CA 90230 ...uunet!qsp!scotts