gtmsecshr commands

Commands

Action

Comments

WAKE_MESSAGE

Sends SIGALRM to specified process.

Used to inform receiving process that a resource (such as a critical section) it awaits has become available.

CONTINUE_PROCESS

Sends SIGCONT to specified process.

Used to awake a process that has been suspended while holding a resource. [a]

CHECK_PROCESS_ALIVE

Test sending a signal to specified process. [b]

Used to determine if a process owning a resource still exists; if not, the resource is available to be grabbed by another process that needs it.

REMOVE_SEM

Remove a specified POSIX semaphore.

Used to remove an abandoned semaphore (for example, if the last attached process terminated abnormally).

REMOVE_SHMMEM

Remove a specified shared memory segment.

Used to remove an abandoned shared memory segment. Before removing the segment, gtmsecshr checks that there are no processes attached to it.

REMOVE_FILE

Remove a specified file.

Used to remove an abandoned socket file (for example, as a result of abnormal process termination) used for interprocess communication on platforms that do not support memory semaphores (msems); unused on other platforms. Before removal, gtmsecshr verifies that the file is a socket file, in directory $gtm_tmp, and its name matches GT.M socket file naming conventions.

FLUSH_DB_IPCS_INFO

Writes file header of specified database file to disk.

The ipc resources (shared memory and semaphore) created for a database file are stored in the database file header. The first process opening a database file initializes these fields while the last process to use the database clears them. If neither of them has read-write access permissions to the database file, they set/reset these fields in shared memory and gtmsecshr will write the database file header from shared memory to disk on their behalf.

[a] Please do not ever suspend a GT.M processes. In the event GT.M finds a process suspended while holding a resource, it is sent a SIGCONT.

[b] This function is no longer needed and will be removed soon.