Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!wugate!uunet!mcsun!ukc!edcastle!aiai!richard From: richard@aiai.ed.ac.uk (Richard Tobin) Newsgroups: comp.unix.wizards Subject: Re: Strange SUN behaviour. Keywords: killing, ctrl-d, sun3, OS4. Message-ID: <1203@skye.ed.ac.uk> Date: 10 Oct 89 16:22:55 GMT References: <703@hrc63.uucp> Reply-To: richard@aiai.UUCP (Richard Tobin) Organization: AIAI, University of Edinburgh, Scotland Lines: 21 In article <703@hrc63.uucp> paj@hrc63.uucp (Mr P Johnson "Baddow") writes: >This package plays >tricks with the stack and also does some signal management for non-blocking >I/O. >When one of these programs is killed by a signal (even kill -9), the shell >it is running in dies as well. Sounds like the terminal is being left in non-blocking i/o mode - this will cause reads by the shell to return EWOULDBLOCK. You could put a wrapper round the program that resets the tty to blocking i/o mode if it's killed; it just needs to do something like fcntl(open("/dev/tty"), F_SETFL, 0); -- Richard -- Richard Tobin, JANET: R.Tobin@uk.ac.ed AI Applications Institute, ARPA: R.Tobin%uk.ac.ed@nsfnet-relay.ac.uk Edinburgh University. UUCP: ...!ukc!ed.ac.uk!R.Tobin