Returns process control to the debugger when the given signal is generated. Also turns on notification for a specified ON-unit, or all default ON-units.
CATCH {/DEFAULT | [/NIGNORE|/IGNORE] signal}
or
CATCH {ON-unit}{/DEFAULT}
where:
In the following example, process control returns from the child process to the debugger when SIGALRM is generated.
CodeWatch> CATCH /IGNORE SIGALRM Changing SIGALRM to be caught and ignored.
When the child process resumes, it ignores the SIGALRM and continues as if it had never generated a SIGALRM.
In the following example, the number 28 represents the signal SIGWINCH. Process control returns from the child process to the debugger when a SIGWINCH is generated.
CodeWatch> CATCH /NIGNORE 28 Changing SIGWINCH to be caught and not ignored.
When the child process resumes, it recognizes the signal SIGWINCH and continue as if it had incurred a SIGWINCH.
This example turns on notification for an endfile ON-unit.
CodeWatch> CATCH ENDFILE Adding ENDFILE to be caught.
CodeWatch> CATCH /IGNORE ENDFILE /IGNORE and NIGNORE flags are not allowed with On units - ignored. Adding ENDFILE to be caught.
Description
The occurrence of a signal that is set to be caught and ignored (/IGNORE) returns process control to the debugger. When the child process subsequently resumes (for example, by using Step or Continue), it continues as if it had not incurred the given signal.
The occurrence of a signal that is set to be caught and not ignored (/NIGNORE), returns process control to the debugger. When the child process subsequently resumes, it continues as if it had incurred the given signal. The occurrence of a signal that is not set to be caught does not return process control to the debugger.
By default, certain signals and on-units are caught by the debugger. The Default option resets all CATCH settings back to the debugger's default settings.
Use the LCATCH /ALL command to get a list of current signal and on-unit settings.