发新话题
打印

shell问题

如何让用户直接登陆到自己编写的shell并且无法用ctrl+c退出shell?
最好有个小程序,谢谢先!
      

TOP

Use trap.

Put a line like this:
trap "" 2The command form is this:
trap [arg] [signal_spec]
For more info, read the manual for Borne  shell or better Borne-again shell. If you use bash, just give a command like this:
help trap      

TOP

Use trap

Put a line like this:
trap "" 2
If you use bash, give a command like this:
help trap
for more information.      

TOP

发新话题