trap [-lp] [arg] [sigspec ...]
The command arg is to be read and executed when the shell
receives signal(s) sigspec. If arg is absent or -, all speci-
fied signals are reset to their original values (the values they
had upon entrance to the shell). If arg is the null string the
signal specified by each sigspec is ignored by the shell and by
the commands it invokes. If arg is not present and -p has been
supplied, then the trap commands associated with each sigspec
are displayed. If no arguments are supplied or if only -p is
given, trap prints the list of commands associated with each
signal number. Each sigspec is either a signal name defined in
<signal.h>, or a signal number. If a sigspec is EXIT (0) the
command arg is executed on exit from the shell. If a sigspec is
DEBUG, the command arg is executed after every simple command
(see SHELL GRAMMAR above). If a sigspec is ERR, the command arg
is executed whenever a simple command has a non-zero exit sta-
tus. The ERR trap is not executed if the failed command is part
of an until or while loop, part of an if statement, part of a &&
or ?귘봻 list, or if the command?셲 return value is being inverted
via !. The -l option causes the shell to print a list of signal
names and their corresponding numbers. Signals ignored upon
entry to the shell cannot be trapped or reset. Trapped signals
are reset to their original values in a child process when it is
created. The return status is false if any sigspec is invalid;
otherwise trap returns true.
[code:1]$ man trap[/code:1]
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
Korean Ver: http://cinsk.github.io/cfaqs/
죄송한데요.
뭘 말씀하시는 지 잘 모르겠습니다.
말씀하신대로 man trap을 해봤지만 다음과 같은 내용이 나와서
저는 시그널을 막는 루틴을 쉘프로그램안에 넣어서 SIGINI을 막아보려고 하는데요
답을 잘 못찾겠네요.
(제가 떠줘야 알아듣는 바보같다는 생각이 드네요 --;;)
[code:1]#!/bin/shtrap "" I
영문이라도.. 잘 해석해보려는 노력을 하심이 어떠신지.. ^^
해석은 했지요~
해석은 했지요.
그만한 노력도 안하면 날로먹겠다는거지요.
한가지 차이라면
저는 이렇게
trap " " SIGINT
한번 해보고는 안되나부다~ 그랬던... ㅜ.ㅜ
아~ 감사합니다!
댓글 달기