Disable CTRL G

Peter Andersson peppe@REDACTED
Tue Dec 2 16:31:49 CET 2003


Sean,

The restricted shell mode + "ignore break" is indeed there for
protection against simple operator mistakes. Pressing 'q' and stopping
the node in e.g. an attempt to exit the job control (JCL) mode, could
very well happen by mistake.

So, speaking of mistakes, not being able to disable the JCL quit option
- that's one for sure. Bugger.

Here's my suggestion: The ignore break flag, erl +Bi, is already used
for disabling ^C break/stop of the system. Let's have the same flag also
disable any shell shortcut for stopping the system (that'd be the JCL
quit option). After all, it's the same kind of "halt by accident" from
the shell that we'd be trying to avoid. Do you agree? If so, I'll get to
it.

Until it's fixed, you know ^G in a primitive Erlang shell (erl
-oldshell) will only restart the current evaluator, not bring up the JCL
menu? So you get no halt() shortcuts when using a restricted oldshell
ignoring break (erl -oldshell -stdlib restricted_shell <mod> +Bi).

 /Peppe 

Ericsson AB, Erlang/OTP


Sean Hinde wrote:
> 
> Hi,
> 
> I am greatly enthused by the new restricted shell mode in R9C - I see
> our systems getting safer by the day.
> 
> I now find myself wondering if it is possible to start an Erlang node
> with the CTRL-G handler disabled. As far as I can make out from a read
> of the most accurate documentation I could find (the source to
> user_drv.erl) this is not something very easy to do at present, but I
> may be mistaken.
> 
> It would be almost enough to be able to remove the 'q' option from the
> CTRL-G handler..
> 
> Any ideas anyone?
> Sean



More information about the erlang-questions mailing list