Open System Services Porting Guide (G06.29+, H06.06+, J06.03+)

FUP RENAME TEMP,myfile
Protect the application by creating the file as a Guardian Format 1 file and then appending
data to the file. For example, replace this command:
cp myfile /G/disk/subvol/myfile
With these commands:
gtacl -c 'FUP CREATE $disk.subvol.myfile, FORMAT 1, TYPE U, ODDUNSTR,
CODE 180, EXT (28,1400), MAXTENTS 749
cat myfile >> /G/disk/subvol/myfile
Guardian Procedures Extended for OSS Files
Some Guardian file system procedure calls are extended to manipulate OSS files:
FILE_GETINFO_
FILE_GETINFOBYNAME_
FILE_GETINFOLIST_
FILE_GETINFOLISTBYNAME_
FILE_OPEN_
FILE_OPEN_CHKPT_
SETMODE
The FILE_GET* procedures determine whether a file is an OSS file or a Guardian file. Additionally,
each provides slightly more specialized information. For instance, the FILE_GETINFO_ procedure
obtains a limited set of information about a file identified by file number, and FILE_GETINFOLIST_
obtains detailed information about the file identified by file number. The Guardian
FILE_GETINFOBYNAME_ procedure identifies Guardian objects, file attributes, processes, terminal
names, and tape devices.
The FILE_OPEN_ procedure establishes a communication path between an application process
and a file; it also returns a file number to the caller. The file number identifies the access path to
the file in subsequent file-system calls. The FILE_OPEN_ procedure can be used to open OSS files.
When it is used with the READX and AWAITIOX procedures, data is read from an OSS file in
nowait mode. The FILE_OPEN_CHKPT_ procedure opens a designated file for a backup process.
The SETMODE procedure is used to set device-dependent properties.
Details on how to use these calls are provided in the Guardian Procedure Calls Reference Manual.
Also, examples for using some of these procedures are included in the Open System Services
Programmer’s Guide.
Native Signal Interoperability
Signals are software interrupts that provide a way of handling asynchronous events, such as a
user at a terminal typing an interrupt key, timer expiration, or abnormal termination of a process.
Both OSS and Guardian native processes can send, receive, and handle signals using the functions
in the OSS API, which conform to the POSIX.1 standard. However, there are some important
differences, (mostly with respect to how Guardian processes interact with signals) which are
summarized as follows:
Control of a process over itself and other processes: an OSS process can control (or send a
signal to) itself using a function such as raise(), abort(), or sleep(). An OSS process
80 Interoperating Between Programming Environments