F$Send

From NitrOS-9
Jump to: navigation, search
Send Sends a signal to a specified process
OS9 F$Send 103F 08

Entry Conditions

A destination process ID

B signal code

Error Output

CC carry set on error

B error code (if any)

Additional Information

  • The signal code is a single byte value in the rage 0 through 255.
  • If the destination process is sleeping or waiting, NitrOS-9 activates the process so that the process can process the signal.
  • If a signal trap is set up, F$Send executes the signal processing routing (Intercept). If none was set up, the signal terminates the destination process and the signal code becomes the exit status. (See the Wait system call.) An exception is the wakeup signal; that signal does not cause the signal intercept routine to be executed.
  • Signal codes are defined as follows:

0 System terminate (cannot be intercepted)

1 Wake up the process

2 Keyboard terminate

3 Keyboard interrupt

128-255 User defined

  • If you try to send a signal to a process that has a signal pending, NitrOS-9 cancels the current Send call and returns an error. Issue a Sleep call for a few ticks; then, try again.
  • The Sleep call saves CPU time. See the Intercept, Wait, and Sleep system calls for more information.

krnp2