HP Visualize J280 hp workstations - hp-ux 10.20 graphics administration guide - Page 116
SIGALRM Details, Other Threads-Related Information
View all HP Visualize J280 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 116 highlights
Other Threads-Related Information 1. All of the 3D graphics functions are cancellation points. 2. None of the 3D graphics functions are async-cancel safe. 3. None of the 3D graphics functions are async-signal safe. 4. None of the 3D graphics functions are fork-safe, i.e., they cannot be called by a child process after a fork(2), but before an exec(2). Note: Calls to 3D graphics functions between a fork and an exec have never been supported 5. There is one situation in which graphics behavior may be different for multi-threaded versus single-threaded programs. In a multi-threaded Starbase application, a call to gopen(3g) a serial plotter might not return if the plotter does not respond (e.g., if the plotter is turned off). In this multi-threaded case, the graphics thread could wait forever for the device. Singlethreaded behavior in this case is for the gopen(3g) to timeout and return an error. SIGALRM Details The Starbase library temporarily sets a SIGALRM signal handler and uses setitimer(2) to start a timer in two situations: 1. To set a timeout for device access in calls to gopen(3g) for a serial plotter. 2. To set a maximum time to wait for an event in calls to await_event(3g), read_choice_event(3g), read_locator_event(3g), and intread_locator_event(3g). Calls to the above Starbase functions should not be made in one thread while at the same time another thread performs any of the following: • Changes the SIGALRM signal action; • Calls sigwait(2), selecting the SIGALRM signal; • Uses setitimer(2); • Uses timer_settime(2) to set a timer which will generate a SIGALRM signal. Possible consequences of violating these non-concurrency restrictions are: • The Starbase function call never returns; • The wait for a plotter response or for an event is shorter than it should be; • Alarm signals from timers set in other threads do not have the desired effect (because the graphics signal handler is in place); • Unpredictable results due to concurrent use of the process-wide timer provided by setitimer(2). Page 116 Graphics Administration Guide for HP-UX 10.20