Do you want BuboFlash to help you learning these things? Or do you want to add or correct something? Click here to log in or create user.



Question
In linux, you can use the [...] built-in command if you want to make your script perform certain actions in response to a signal (e.g. SIGINT, when ctrl-c is pressed)
Answer

trap

^^ the way you use trap is first create a function (e.g. called on_exit ) to react to the desired signal, then run trap like so, to bind the function to the signal: trap on_exit SIGINT


Question
In linux, you can use the [...] built-in command if you want to make your script perform certain actions in response to a signal (e.g. SIGINT, when ctrl-c is pressed)
Answer
?

Question
In linux, you can use the [...] built-in command if you want to make your script perform certain actions in response to a signal (e.g. SIGINT, when ctrl-c is pressed)
Answer

trap

^^ the way you use trap is first create a function (e.g. called on_exit ) to react to the desired signal, then run trap like so, to bind the function to the signal: trap on_exit SIGINT

If you want to change selection, open document below and click on "Move attachment"

20. Advanced Shell Scripting
ground process with process ID of PID has exited, then returns the exit code of the background process. wait % job Same with respect to a job spec. 20.5 Trapping Signals -- the trap Command You <span>will often want to make your script perform certain actions in response to a signal. A list of signals can be found on page . To trap a signal, create a function and then use the trap command to bind the function to the signal. 5 10 #!/bin/sh function on_hangup () { ec

Summary

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

Details

No repetitions


Discussion

Do you want to join discussion? Click here to log in or create user.