Sending a signal from the child process is easily achieved, but there may be unfortuate consequences. The application is sending commands to the X-server all of the time, and in principle a signal might occur during the process of client-server communication. This would not be dangereous except for the fact that the signal itself initiates X-server commands (in order to draw the green line), so some method of making X protocol requests atomic has to be employed.
Fortuately, the necessary methods are provided by the xview package. There are things that an xview client is not supposed to do. One of these is to service interrupts recieved by the signal method directly, and another is to use sleep etc. to suspend itself. Both potentially interfere with the proper operation of client-server communication. If the client wants to use interrupts, it has to register itself as a signal acceptor as follows:
notify_set_signal_func(frame, update_frame_posn, SIGUSR1, NOTIFY_SYNC);
This call appears at the end of the initialiser for the xview data structures, and associates the service routine for the signal SIGUSR1 with the servicing function update_frame_posn. frame is the parent frame of the application, and NOTIFY_SYNC indicates that the service of the interrupt should be delayed until pending X-protocol exchanges are complete.