Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!im4u!ut-sally!utah-cs!utah-gr!stride!stride1!mitch From: mitch@stride1.UUCP Newsgroups: comp.unix.wizards Subject: Re: tty hangs in ^S state was (Re: Killing the printer daemon) Message-ID: <684@stride.Stride.COM> Date: Thu, 1-Oct-87 19:34:56 EDT Article-I.D.: stride.684 Posted: Thu Oct 1 19:34:56 1987 Date-Received: Sat, 3-Oct-87 09:50:21 EDT References: <2419@drivax.UUCP> <366@cogen.UUCP> Sender: news@stride.Stride.COM Reply-To: mitch@stride1.UUCP (Thomas P. Mitchell) Distribution: world Organization: MicroSage Comp. Sys. Inc., 680 S. Rock Blvd, Reno, NV 89502 Lines: 49 In article <366@cogen.UUCP> alen@cogen.UUCP (Alen Shapiro) writes: >In article <2419@drivax.UUCP> braun@drivax.UUCP (Kral) writes: >> >>After rebooting and recreating the situation, I tried to kill the daemon >>manually with kill -9. It just won't die. So what's an admin to do? >> Rebooting? Is this a power up type reboot? If not a powerup reboot the UART init routines need to be looked at. Some drivers may make some silly assumptions about the state of the hardware. Yet some UARTS are silly and little can be done. Don't forget that the problem may be with the printer. > >I've had a similar problem before, the printer was on a serial >interface and the printer died when the line was in a ^S state. >The daemon process which was in an i/o pending state would not die >until we attached a tty and typed ^Q at it!!!! > >Does ANYONE have a better solution please? Well maybe -- On some System V derrived systems there is a system call (ioctl) to unblock a serial port blocked on ^s_stop. Here is a quick chunk of code which clears the condition on a specific port. It should be rewritten to use standard in and out and check for errors and such. So far it has always been simpler to just recompile. Check your system to see if this is for you. Check owner and permissions of the device. Good luck, ------------------------------------------------------------- /* * unwedge.c -- there is a race condition which can * have the driver hung on a ^s_stop with ^s^q (Xon/Xoff) * disabled. This will send an ioctl to the driver to * change this. */ #include main() { register int fd=open("/dev/tty_port_that_is_stuck",2); ioctl(fd, TCXONC,1); } Thomas P. Mitchell (mitch@stride1.Stride.COM) Phone: (702) 322-6868 TWX: 910-395-6073 MicroSage Computer Systems Inc. a Division of Stride Micro. Opinions expressed are probably mine.