[comp.mail.elm] Fix to allow INTERRUPT in subshell

mechjgh@tness1.UUCP (Greg Hackney) (06/28/87)

Here's a hack to Elm to enable an INTERRUPT when
running a subshell. I was running a "tail -f" program
in the subshell and got stuck forever because Elm was
ignoring INTERRUPTS.

My copy of Elm is patched out to the max, so I'll pass it
on in plain english:

-----------------
In the program syscall.c in the function subshell() :

Add this at the beginning of the function:
   register int (*istat)();

Change the line:
   ret = system_call(command,USER_SHELL);

To read:
   istat = signal(SIGINT,istat);	/* allow INTERRUPT in subshell */
   ret = system_call(command,USER_SHELL);
   istat = signal(SIGINT,istat);	/* ignore INTERRUPT after shell */
----------------

Greg Hackney (214+464-2771)
Southwestern Bell Telephone Co.
Texas Network Engineering Support Systems
One Bell Plaza, Room 1825.08
Dallas, Texas 75202

UUCP: ihnp4!tness1!mechjgh