[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: Does control-C from console interrupt ash script execution?
From: Denis Vlasenko <vda.linux () googlemail ! com>
Date: 2007-06-29 16:18:29
Message-ID: 200706291818.29486.vda.linux () googlemail ! com
[Download RAW message or body]
On Wednesday 27 June 2007 17:35, Dallas Clement wrote:
> Hello All,
>
> I am executing an ash init script from initramfs. I have only the
> console for I/O at this time -- no TTYs available.
>
> My init script prompts for input like so:
>
> printf " is that correct? (y|n) -> "
> read confirm
>
> Should I be able to interrupt ash script execution with a control-C?
>
> I am trying to trap it in my script as follows:
>
> trap abort 2
No, it won't work. Ctrl-C, Ctrl-Z etc have special
meaning only when they come from controlling tty.
/dev/console cannot be a controlling tty in Linux.
(there is code in kernel which disallows this).
See cttyhack (and its help text) in newer busybox.
--
vda
_______________________________________________
busybox mailing list
busybox@busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic