Signal Description

This table lists the signals currently used by D3.

NOTE

Future development may require using more signals.

 

SIGHUP

Hangup. When received, the process is logged off D3, but remains connected to the virtual machine. The signal is controlled by the hupcl command in the D3 configuration file. It is generated by the TTY device driver when the data carrier is lost. This signal can be altered by the TCL command trap dcd.

SIGINT

Interrupt. Generated by the BREAK key and the alternate virtual machine. The break character is defined by brkchr in the configuration file or by the TCL command set-break. The process is sent to the FlashBASIC or system debugger if brk-debug is on or if brk-level is on.

SIGQUIT

Quit. Generated by the ESC key or the alternate escape character as defined by the escchr in the configuration file or by the TCL command set-esc. A level is pushed if esc-level is on. If esc-data is on, a signal is still generated, but eventually ignored by the Virtual debugger. The character defined by set-esc is eventually put in the process input buffer, but it must be emphasized that a noticeable delay can be experienced when inputting this character.

SIGILL

Illegal instruction. Sends the process to the system debugger with an illegal opcode abort. Used for assembly single stepping on some implementations.

SIGTRAP

Trace trap. Sends the process to the system debugger with an illegal opcode abort. Used for assembly single stepping on some implementations.

SIGIOT

I/O trap instruction. Sends the process to the system debugger with an illegal opcode abort.

SIGEMT

Emulator trap. Sends the process to the system debugger with an illegal opcode abort. Used for assembly single stepping on some implementations.

SIGFPE

Floating point exception. Sends the process to the system debugger with an illegal opcode abort.

SIGKILL

Kill. This signal cannot be caught and terminates the process immediately after logging off. Killing the flusher on a virtual machine logs all processes off and shuts down the virtual machine.

SIGBUS

Bus error. Sends the process to the system debugger with an illegal opcode abort. Used for assembly single stepping on some implementations.

SIGSEGV

Segmentation violation. Sends the process to the system debugger with an illegal opcode abort. Used for assembly single stepping on some implementations.

SIGSYS

Bad argument to a system call. Sends the process to the system debugger with an illegal opcode abort.

SIGPIPE

Write to a pipe with no one to read it. The process is sent to the Virtual Debugger. Pipes are sometimes used as tapes to perform a file save. The other end of the pipe can be connected to a serial device, a communication server process. Therefore, when this signal is raised, the write system calls abort. For example, in an application environment, this signal is caught and the message Communication Server not Ready is sent to the user. The write system call is then interrupted, reported to the save process as a parity error, and the write is retried until it finally succeeds.

SIGALRM

Alarm clock. The default signal handler is a simple return. Therefore, the signal is active, but does nothing. It can be used in FlashBASIC, with the %alarm() function. It does set time-outs around critical sections. This signal can be altered by the TCL trap alrm command.

SIGTERM

Software termination signal. This signal terminates the D3 process, leaving it logged on, but disconnected. This signal freezes the D3 environment. If the process is restarted, execution resumes where it is stopped. This signal is preceded by SIGHUP to log the process off.

SIGUSR1

User-defined signal 1. Can be used freely by the applications.

NOTE—This parameter is not used.

SIGUSR2

User-defined signal 2. Forces the process to examine its current state and change it, if necessary. This signal is used by the TCL logoff, d3tcl, and end commands.

NOTE—Sending this signal out of context causes no harm. This signal is used to wake up a process waiting in a %pause() system call. Also, this signal can be used by applications, provided that they call the D3 signal handler, inside their customized signal handler.

SIGCLD

Terminates a child process.

NOTE—This parameter is not used.

SIGPWR

Power failure. When received, the process is logged off D3, but remains connected to the virtual machine. The behavior of the system depends on how the hardware generates this signal. If there is no battery back up, it is unlikely that the virtual machine is brought down gently. The system can change its running state, which controls what happens. A d3 -k command should be inserted in the appropriate shell script associated to the new run level. This signal can be altered by the TCL trap pwr command.