Open System Services Porting Guide (G06.29+, H06.06+, J06.03+)
can also exercise control over another OSS process by sending a signal to it using the kill()
function.
A Guardian native process can use most of the signal functions in the OSS API to send, receive,
and handle signals but only for the purpose of exercising control over itself. Guardian native
process cannot send a signal to or receive a signal from another Guardian or OSS process
using the kill() function.
• Signals in native and TNS processes: any OSS process (native or G-series TNS) can use OSS
signal functions. Only a native Guardian process can use OSS signal functions.
• Interrupts from a terminal as signals: when a user types an interrupt key at a terminal, an OSS
process receives the interrupt as a signal. A Guardian process receives the interrupt as a
system message and must read its $RECEIVE file to get the interrupt.
• Process signal mask: the process signal mask of an OSS process is initialized to that of its
parent process. The process signal mask of a Guardian process is initialized so that no signals
are blocked from delivery to it.
• Default signal handler: the Common Run-Time Environment (CRE) sets up a default signal
handler for a Guardian program written in C. The CRE does not set up a default signal handler
for an OSS program written in C.
Refer to the Guardian Programmer’s Guide for more information on signal handling for Guardian
processes. Refer also to the API interoperability table for TNS/R and TNS/E native processes in
the Open System Services Programmer’s Guide for details on signal-related functions available in
the native Guardian and OSS environments. The Open System Services Programmer’s Guide also
contains more information on signal interoperability, relating to using the HP extension signal
functions.
For the specifics of the signals functions in the OSS API, see the online reference pages or the
Open System Services System Calls Reference Manual and the Open System Services Library Calls
Reference Manual. For the specifics of the procedures in the Guardian API, see the Guardian
Procedure Calls Reference Manual.
I/O Interoperability
This subsection includes a brief discussion of I/O interoperability in the OSS environment; specifically
tape I/O, terminal I/O, and printer I/O.
Tape I/O
The OSS environment has no programmatic access to tapes; there are no OSS I/O functions that
apply to printers or tape drives. To access tapes in the OSS environment you must use the pax
utility. You can, however, use Guardian procedures to write OSS files and output directly to tape
and read the files directly from tape. The pax utility is discussed in Chapter 2 (page 31). An
example of how to use thepax utility from a program is included in the Open System Services
Programmer’s Guide.
Terminal I/O
The only terminals supported in the OSS environment are a Telserv window and the three OSSTTY
windows: #stdin, #stdout, and #stderr. Terminal I/O through a Telserv window is the same
as that for a UNIX network terminal. OSS also supports local terminals through OSSTTY, although
OSSTTY has the look and feel of a remote terminal. OSS terminal I/O functions operate only on
the terminal device /dev/tty. The functions cfsetispeed() and cfsetospeed() have no
effect on the network terminals (they affect only local terminals). The function tcsetattr affects
both the Telserv and OSSTTY terminals.
The only way to access the OSS environment interactively is through an OSSTTY window or through
a Telserv virtual terminal, or window, with VT100 emulation. The Open System Services
I/O Interoperability 81