jkh@meepmeep.pcs.com (Jordan K. Hubbard) (08/26/89)
Some time ago, a number of people (well, perhaps 2 or 3) noted that 18.54 would frequently go into CPU chewing mode under system V. I finally found exactly where that was, which is in wait_reading_process_input() in process.c. The second select() call returns immediately with errno set to 4 (interrupted system call) and returns, eventually doing nothing inportant and returning to select (which immediately gets another signal). This loops indefinately and eats your CPU. Just for funzies, I surrounded this call with sighold(SIGIO) and sigrelse(SIGIO) calls and the problem went away. Now, however, emacs sometimes hangs in select() under irreproducable circumstances, so I'm not sure that this was the correct solution (though the select() should return with a timeout, no?). I really don't understand what this code is doing and would appreciate it if anyone could shed a little light on it. I especially don't understand why the select() keeps getting interrupted repeatedly. Don't you get just one SIGIO when input is pending? Wouldn't the subsequent select() succeed? Why isn't the SIGIO handler doing its job? Argh. Jordan PCS Computer Systeme GmbH, Munich, West Germany UUCP: pyramid!pcsbst!jkh jkh@meepmeep.pcs.com EUNET: unido!pcsbst!jkh ARPA: jkh@violet.berkeley.edu or hubbard@decwrl.dec.com