gtpc2m8gC/C++ Language Support User's Guide

tpf_process_signals-Process Outstanding Signals

This function checks to see if there are any outstanding signals from another process (sent by the kill function) and performs a raise function to handle each outstanding signal.

Format

#include <sysapi.h>
int tpf_process_signals(void)

Normal Return

The tpf_process_signals function is always successful; it returns the number of signals processed.

Note:
The handling of some signals can cause the calling entry control block (ECB) to exit.

Error Return

Not applicable.

Programming Considerations

Examples

The following example shows a program checking for outstanding signals in a loop that creates child processes.

#include <sysapi.h>

·
·
·
struct tpf_fork_input create_parameters; pid_t child_pid; while (!exit_flag) { create_parameters.program = "/bin/usr/usr1/app1.exe" : child_pid = tpf_fork(&create_parameters); tpf_process_signals(); }

Related Information