linux - What is the actual signal behind ERR -


I have read in several places (including SO) that -e is considered "bad form "And it is incredible to get out of a script at any error, it seems to be a better way to handle the errors that trap is being used like:

 < Code> trap "echo was an error; exit 1;" ERR   

I think what signals ERR can not really be found in the pages of human beings? I'm assuming this SIGQUIT but I'm sure can not get it.

  man 7 signals   

The only normal sign is that you would expect SIGTERM SIGQUIT SIGINT , etc.

ex: "If a net on ARR is set, then the shell gets out. "

     

The man is the net trap makes reference to the ERR in it but does not define it from what I have seen.

What is the real signal behind the shortcut ERR ? (Normal signals are shown in man 7 signal .)

I would like to trap the actual signal name instead of the shortcodes, although I know they will produce the same result (After catching any errors from a command in a script, throw them onto the handler).

mesh signal signal specifications ERR

ERR is one of the signal specifications implemented by internally. . [Note 1] If trap ERR is enabled, then bash will call the same handler in the same case because it exits because set -e was enabled ( As a result, it is no longer "reliable" then set -e but it is much more flexible.)

Other special trap names that do Do not correspond to any signal remove , debug and return .

Help Trap Explain the meaning of these signal specifications.


Note:

  1. Actually, all the signal specifications to Bash , but most of them By implementing signal signal by binding bash and executing signal handler. The execution of special ones signal handlers is included.

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -