> In case anyone here can fix it... > > ------- Start of forwarded message ------- > X-Authentication-Warning: host132.grad.iit.edu: angeloff owned process doing > -bs > Date: Wed, 22 Jan 2003 00:23:14 -0600 (CST) > From: Nikolay Angeloff > X-X-Sender: > To: > cc: rms-assist@gnu.org > Subject: Emacs bug with Solaris 9 (only) > Sender: bug-gnu-emacs-bounces+rms=gnu.org@gnu.org > > In short: quit-process, stop-process, get-process etc. > do not work when emacs is executed (and compiled) in > Solaris 9, but work just fine when the same compiled > code is scp-ed to a Solaris 8 machine. > It seems that ioctl TICSIGNAL is broken in Solaris 9. Emacs uses that to send signals to the slave side of the pty. I propose that Emacs check the return code of ioctl and falls back to killing the process group if the ioctl fails (see patch below). Another thing is that getting the tty foreground process group does not work when using the master side file descriptor, the slave side descriptor must be used. This is true for Solaris 8 also, but there TICSIGNAL works so it is harder to notice.' In process there are two places that gets the terminal process group, process_send_signal and Fprocess_running_child_p. Both places look like this: if (!NILP (p->subtty)) ioctl (XFASTINT (p->subtty), TIOCGPGRP, &gid); else ioctl (XINT (p->infd), TIOCGPGRP, &gid); Now, reading the code it seems to me that p->subtty is unconditionally set to Qnil when the fork of the subprocess succeeds, so the first ioctl will never be executed. Am I missing something? I propose reopening the slave side in Emacs to get the process group. This works in Solaris 8 and 9 and should have no sideeffects on other systems. The attached patch fixes just one place, a better patch would be to introduce an emacs_get_tty_pgrp or something and call that from these two places. The attached patch fixes the fact that you can not do M-x shell sleep 12 C-c C-c and have the sleep interrupted. If this approach is acceptable, I can make a better patch. Also, this should go into RC (the patch is for RC). But I would like to know if the "if (!NILP (p->subtty))" code ever will be TRUE before committing anything. Jan D.