HP Visualize J5000 hp workstations - hp-ux 10.20 graphics administration guide - Page 117

SIGCHLD and the GRM Daemon, The Graphics Resource Manager Daemon

Page 117 highlights

SIGCHLD and the GRM Daemon The Graphics Resource Manager Daemon (grmd) is started when the X11 Server is started. In normal operation, a Starbase, hp PEX, or hp-PHIGS application will not start the daemon, and so will not be affected by the SIGCHLD manipulation that occurs as part of that startup (see below). However, if the grmd dies for some reason, the graphics libraries will restart the daemon whenever they need shared memory. This can occur in the following instances: • During calls to the following Starbase functions: gopen(3g), gclose(3g), enable_events(3g), disable_events(3g), set_signals(3g), and track(3g). • When hp-PHIGS and hp PEX initialize their output devices. • When hp-PHIGS input is initialized. • During calls to glXCreateContext or glXMakeCurrent. When the grmd is started, the sequence of events is: 1. Set the SIGCHLD action to SIG_DFL, saving the old action. 2. fork(2) and exec(2) an intermediate process, which is the grmd's parent. 3. Call waitpid(2) to wait for the intermediate process to die (after starting the grm daemon). 4. Restore the saved SIGCHLD action. Between the time that the graphics thread sets the SIGCHLD action to SIG_DFL and restores the saved action, other threads should not change the SIGCHLD action by calls to sigaction(2), sigvector(2), signal(2), sigset(2), or sigwait(2). The following are possible consequences of such concurrency: • If the concurrent operation sets the SIGCHLD action to SIG_IGN, the graphics thread could hang. • If the concurrent operation installs a signal handler for SIGCHLD, that handler may be invoked when the graphics child process dies. • A call to sigwait might return in response to the death of the graphics child process. • Any SIGCHLD action concurrently set by the application could be overwritten when the graphics thread restores the saved SIGCHLD action. Page 117 Graphics Administration Guide for HP-UX 10.20

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171

SIGCHLD and the GRM Daemon
The Graphics Resource Manager Daemon (
grmd
) is started when the X11 Server is started. In normal
operation, a Starbase, hp PEX, or hp-PHIGS application will not start the daemon, and so will not be
affected by the SIGCHLD manipulation that occurs as part of that startup (see below). However, if the
grmd
dies for some reason, the graphics libraries will restart the daemon whenever they need shared
memory. This can occur in the following instances:
During calls to the following Starbase functions:
gopen(3g), gclose(3g), enable_events(3g),
disable_events(3g), set_signals(3g)
, and
track(3g)
.
When hp-PHIGS and hp PEX initialize their output devices.
When hp-PHIGS input is initialized.
During calls to
glXCreateContext
or
glXMakeCurrent
.
When the grmd is started, the sequence of events is:
1.
Set the
SIGCHLD
action to
SIG_DFL
, saving the old action.
2.
fork(2)
and
exec(2)
an intermediate process, which is the
grmd's
parent.
3.
Call
waitpid(2)
to wait for the intermediate process to die (after starting the
grm
daemon).
4.
Restore the saved
SIGCHLD
action.
Between the time that the graphics thread sets the
SIGCHLD
action to
SIG_DFL
and restores the
saved action, other threads should not change the SIGCHLD action by calls to
sigaction(2),
sigvector(2), signal(2), sigset(2)
, or
sigwait(2)
.
The following are possible consequences of such concurrency:
If the concurrent operation sets the
SIGCHLD
action to
SIG_IGN
, the graphics thread
could hang.
If the concurrent operation installs a signal handler for
SIGCHLD
, that handler may be
invoked when the graphics child process dies.
A call to
sigwait
might return in response to the death of the graphics child process.
Any
SIGCHLD
action concurrently set by the application could be overwritten when the
graphics thread restores the saved
SIGCHLD
action.
Graphics Administration Guide for HP-UX 10.20
Page 117