Areed.183 net.v7bugs utzoo!decvax!ucbvax!ihnss!cbosg!harpo!chico!duke!reed!valer Fri Jul 31 20:51:10 1981 proc on q /* * This program helps generate the "proc on q" * diagnostic. By putting a 9600 keyboard in * CBREAK mode and pounding on the keyboard, * we have been able to consistently produce the * diagnostic in the first line or two of typing. * This diagnostic comes from an interrupt window * in the following code in sig.c: * if(p->p_stat == SSLEEP && p->p_pri > PZERO) * setrun(p); * The fix is to bracket the code as follows: * s = spl6(); * * splx(s); */ brkpt() { } main() { char c; int child; switch(child = fork()) { case 0: for (signal(5, brkpt); ; ) read(0, &c, 1); case -1: perror("fork"); break; default: sleep(2); printf("start typing\n"); for ( ; ; ) kill(child, 5); } } ----------------------------------------------------------------- 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.