[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: Another question



Hi, The following command worked for me: 

 stty intr ""

But even if you set this through, say, /etc/profile, you should be
aware that a normal user would be able to get out of this trap, if he
or she really wishes to do so.  This command, would at best prevent
accidental Ctrl-C's.

Regards,
Lokesh.

>>>>> "Goldwyn" == Goldwyn Rodrigues <goldwyn_r@xxxxxxxxxxxx> writes:

    >> Can I diable ctrl-c function when I am running some shell
    >> script.  Basically I dont want the user to be able to terminate
    >> the shell script using ctrl-c. If this is possible pls send me
    >> the details.

    Goldwyn> stty -a shows all the terminal setting for a particular
    Goldwyn> user. This includes the interrupt key namely ctrl-c( it
    Goldwyn> shows ^c) You can change it by giving the command stty
    Goldwyn> intr ^a. And now Ctrl-a will be the interrupt key. But I
    Goldwyn> don't know how to disable it (namely <undef> form). Maybe
    Goldwyn> somebody else can help.