* _exit() function @ 1997-12-03 5:00 Rob Kirkbride 1997-12-03 5:00 ` Nick Maclaren 0 siblings, 1 reply; 3+ messages in thread From: Rob Kirkbride @ 1997-12-03 5:00 UTC (permalink / raw) I am using the _exit() function with Dec/Alpha 3.2g and sometimes it does not appear to do as advertised. We talk to some printers via a DEC terminal server and if the printers are turned on for a while (and printing starts) and then subsequently turned off the _exit does not complete. I understood the _exit throws away all buffered output and the process should exit straight away. What I find is that a call to the _exit is made but the executable does not finish terminating until a printer is turned back on to allow the output to flush. All the threads in the program have shut down properly it just seems to be waiting for the printer output to clear. Any ideas? Rob -- Rob Kirkbride (rob@rk-comp.demon.co.uk) ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: _exit() function 1997-12-03 5:00 _exit() function Rob Kirkbride @ 1997-12-03 5:00 ` Nick Maclaren 1997-12-04 5:00 ` Rob Kirkbride 0 siblings, 1 reply; 3+ messages in thread From: Nick Maclaren @ 1997-12-03 5:00 UTC (permalink / raw) In article <Dj40uPAfych0EwjK@RK-COMP.DEMON.CO.UK>, Rob Kirkbride <rob@rk-comp.demon.co.uk> wrote: > >I understood the _exit throws away all buffered output and the process >should exit straight away. What I find is that a call to the _exit is >made but the executable does not finish terminating until a printer is >turned back on to allow the output to flush. All the threads in the >program have shut down properly it just seems to be waiting for the >printer output to clear. You are mistaken - the _exit call IS working as described, but the underlying system is not doing what you expect. All _exit does is to return control to the operating system, which then has the job of cleaning up. You lose buffered output because the C run-time system is not called to write it. Most files are closed fairly quickly, though there can be problems with NFS, but the problem you are seeing is with closing sockets. These are a Berkeleyism, and have been kludged up most horribly on all Unices. One of the effects is that it isn't always possible to do an emergency close from either end - you have to wait for the other end to close the socket. Sorry, but all you can do is to moan at your vendor, who will make evasive noises. You MAY get them to implement another kludge, with the hope of reducing the frequency of this effect. Nick Maclaren, University of Cambridge Computer Laboratory, New Museums Site, Pembroke Street, Cambridge CB2 3QG, England. Email: nmm1@cam.ac.uk Tel.: +44 1223 334761 Fax: +44 1223 334679 ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: _exit() function 1997-12-03 5:00 ` Nick Maclaren @ 1997-12-04 5:00 ` Rob Kirkbride 0 siblings, 0 replies; 3+ messages in thread From: Rob Kirkbride @ 1997-12-04 5:00 UTC (permalink / raw) >You are mistaken - the _exit call IS working as described, but the >underlying system is not doing what you expect. All _exit does is >to return control to the operating system, which then has the job of >cleaning up. You lose buffered output because the C run-time system >is not called to write it. > >Most files are closed fairly quickly, though there can be problems >with NFS, but the problem you are seeing is with closing sockets. >These are a Berkeleyism, and have been kludged up most horribly on >all Unices. One of the effects is that it isn't always possible to >do an emergency close from either end - you have to wait for the >other end to close the socket. > >Sorry, but all you can do is to moan at your vendor, who will make >evasive noises. You MAY get them to implement another kludge, with >the hope of reducing the frequency of this effect. Thanks for the reply. We did try complaining to DEC, we were using exit() to begin with , they then recommended _exit, we tried that, that has failed and now they are saying use exit() again! I guess we'll have to have a winge again - we certainly spend enough money with them! Rob -- Rob Kirkbride (rob@rk-comp.demon.co.uk) ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1997-12-04 5:00 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 1997-12-03 5:00 _exit() function Rob Kirkbride 1997-12-03 5:00 ` Nick Maclaren 1997-12-04 5:00 ` Rob Kirkbride
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox