Aucbvax.2692 fa.unix-wizards utzoo!decvax!ucbvax!unix-wizards Fri Aug 14 14:38:23 1981 Re: Bug (?) in tty >From Greg@NPRDC Fri Aug 14 14:35:53 1981 I have encountered the same problem. My fix was to check the ISOPEN bit in the tty struct to see if it was busy, but to permit a child of init to force ownership. If there is a prior claim, it tries to do away with it. The code from tty$ttyopen is reproduced below. Zapping the tty struct in exit may not be sufficient if there are background jobs still running. pp = u.u_procp; tp = atp; if(pp->p_pgrp == 0) { pp->p_pgrp = pp->p_pid; u.u_ttyp = tp; u.u_ttyd = dev; if((tp->t_state&ISOPEN) == 0 || pp->p_ppid == 1) { if(tp->t_pgrp) { signal(tp->t_pgrp, SIGHUP); flushtty(tp); } tp->t_pgrp = pp->p_pid; tp->t_col = -1; } } tp->t_state =& ~WOPEN; tp->t_state =| ISOPEN; ----------------------------------------------------------------- gopher://quux.org/ conversion by John Goerzen of http://communication.ucsd.edu/A-News/ This Usenet Oldnews Archive article may be copied and distributed freely, provided: 1. There is no money collected for the text(s) of the articles. 2. The following notice remains appended to each copy: The Usenet Oldnews Archive: Compilation Copyright (C) 1981, 1996 Bruce Jones, Henry Spencer, David Wiseman.