Thunderstone Software Document Search, Retrieval, and Management
Search:
Vortex Manual
 

TRAP - trap signals

 

SYNOPSIS

<TRAP [CONNRESET=on|off|N] [[SIGNALS=]on|off|N]>


DESCRIPTION
The TRAP directive sets whether to trap signals or not; by default signals are trapped. This directive is for diagnostic purposes and is not typically used by production scripts. The SIGNALS value is an integer whose bits have the following meanings:

  • Bit 0: Catch non-ABEND signals (e.g. SIGTERM)

  • Bit 1: Catch ABEND signals (e.g. SIGSEGV)

  • Bit 2: Try to dump core after ABEND via null deference

  • Bit 3: Try to dump core after ABEND via signal return

  • Bit 4: Print registers at ABEND

  • Bit 5: Print 1KB of stack at ABEND

  • Bit 6: Print 16KB of stack at ABEND

  • Bit 7: Print location details (if known) at ABEND

  • Bit 8: Ignore SIGHUP signals (Unix)

The default value "on" is the same as 0x83; "off" is 0.

Bit 7 was added and became part of the default in version 5.00.1088099065 20040624. Bit 8 was added in version 5.01.1103822414 20041223.

The CONNRESET option was added in version 3.01.989300000 20010507, and controls whether to trap connection-reset on stdout, i.e. when the remote browser prematurely terminates the connection (user hits stop button). Its bit flags are defined as follows:

  • Bit 0: Trap SIGIO SO_ERROR recognized error

  • Bit 1: Trap SIGIO MSG_PEEK recognized error

  • Bit 2: Trap SIGIO MSG_PEEK no data

  • Bit 3: Log truncated standard-out data if possible

  • Bit 4: Debug print on every SIGIO

  • Bit 5: Continue; do not exit if connection-reset detected

The default value "on" is the same as 7; "off" is 0.

The TRAP directive can be overridden at run time by the command-line option -x (for the SIGNALS value only; here), which in turn can be overridden by the trap setting of the vxcp function (here).


EXAMPLE

<TRAP off>

<A NAME=main>
  ... script code to analyze ...
</A>


CAVEATS
The <TRAP> directive was added in version 3.0.947100000 20000105.

Turning off signals can cause aberrant behavior, particularly with <EXEC> and <TIMEOUT>.

Not all SIGNALS flags are supported on all platforms; in particular the printing flags.

The bit flags may change in future versions. The values are documented as of version 4.03.


SEE ALSO
vxcp


Copyright © Thunderstone Software     Last updated: Thu Dec 22 15:13:31 EST 2011
 
Home   ::   Products   ::   Solutions   ::   How to Buy   ::   Support   ::   Contact Us   ::   News   ::   About
Copyright © 2012 Thunderstone Software LLC. All rights reserved.