Article View: NET.eunice
Article #7Stopping from the Shells
From: uncwhm
Date: Thu, 16 Jul 1981 00:21
Date: Thu, 16 Jul 1981 00:21
24 lines
1400 bytes
1400 bytes
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
Technical Details
Message-ID:
<anews.Aunc.995>Path:
arc1-ca.pugleaf.net!utzoo!duke!unc!whmShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!duke!unc!whm From: unc!whm Newsgroups: NET.eunice Subject: Stopping from the Shells Date: Thu, 16 Jul 1981 00:21:44 +0000 Message-ID: <anews.Aunc.995>