Stopping from the Shells
utzoo!duke!unc!whm
utzoo!duke!unc!whm
Thu Jul 16 00:21:44 AEST 1981
A recent conversation with Kashtan yielded a very simple solution to current
inability to interrupt programs started from a shell under Eunice. In the
shell, if you start a program, say cat, and tried to stop it with a ^Y, it
would kill the shell, not the program. Two ^C's would do the same thing.
The solution, although not very elegant is to wire in a SIGINT trap to each
and every program. This can be done by inserting a call to signal in the
crt0.mar module, then replacing it in libc.olb. Add the following lines to
crt0.mar just before the line: calls #3,G^Main
pushl #Exit ; Address of Exit routine
pushl #2 ; Hardwired define value for SIGINT
calls #2,G^Signal ; signal(SIGINT,exit)
Reassemble crt0.mar and replace it in libc. You might want to make a backup
of libc before you replace it, just in case.
Now, any program that is linked, has the ^C trap builtin, if invoked from
the Cshell, a ^C will stop the running program (provided it has been relinked)
and return control to the Cshell.
p.s. I mailed a list of changes to make 4bsd Vi work under Eunice to all
those who had requested it, anybody that asked for it and didn't get it should
let me know.
Bill Mitchell, NCSU
More information about the Comp.os.eunice
mailing list