[comp.os.minix] Using DEL key to interrupt programs in 1.5.0

brucee@runxtsa.runx.oz.au (Bruce Evans) (01/30/90)

In article <595@loft386.UUCP> wbrown@loft386.UUCP (Wayne Brown) writes:
>After applying the recently-posted fix to lib.h for begsig, I still had
>problems with the DEL key failing to interrupt executing programs.  Sometimes
>it worked, sometimes it didn't.  At first I thought it was random, but after
>[...]
>and it quits working.  The fix is simple:  In cron.c, the line to close stdout
>when cron puts itself in the background is commented out.  Remove the comment
>so that stdout is closed and it works great.

Sorry, I commented out the line, thinking that printfs later in the file
need to have stdout open. In fact, stdout is supposed to be reopened soon
after as 'cronlog', in a cryptic and unportable way. Freopen should be
used, or maybe some messing around with dup is required.

Signals are lost because of cron hanging on to the controlling terminal. This
is probably a bug in FS. The calls to tty_exit() and tty_open() are
asymmetrical. Tty_exit() gets called when the parent cron exits, and (I think)
this kills the process group info. Tty_open() doesn't get called from
dev_open() while the child cron hangs onto stdout, because of the new test
at the top of dev_open(). So further clients of the tty get process group 0
(i.e., none) and TTY refuses to send them signals.

For another interrupt key, try Ctrl-F8. This generates an ordinary SIGINT,
so is safer than the SIGKILL from Ctrl-F9 but cannot be ignored like DEL.
-- 
Bruce Evans
Internet: brucee@runx.oz.au    UUCP: uunet!runx.oz.au!brucee

holgi@nadia.UUCP (Holger Kollmer) (02/14/90)

In article <618@runxtsa.runx.oz.au> brucee@runx.oz (Bruce Evans) writes:
>In article <595@loft386.UUCP> wbrown@loft386.UUCP (Wayne Brown) writes:
>>After applying the recently-posted fix to lib.h for begsig, I still had
                                     ^^^^^^^^^^^^^^^^^^^^^^^
>>problems with the DEL key failing to interrupt executing programs.  Sometimes
>>it worked, sometimes it didn't.  At first I thought it was random, but after
>>[...]

I am terrible sorry but I missed the fix for begsig. Could anyone
mail it to me ?

I would appreciate it, thanks

                                                         (holgi)
-- 
Holger Kollmer      "With a rubber duck one's never alone."  -- Douglas Adams