Communication inter applications

This forum is read only. No new submissions are accepted.

Questions about motif? Contact us

3 posts / 0 new
Last post
Communication inter applications

Submitted by Anonymous on Thu, 03/01/2001 - 09:49. Developers
I have a Motif application that call another; the first has to wait until the second ends. I use fork, execl and wait, but while the second application is running, I can`t see the first (it is there, but the widgets disappear). I`d like that while the second is running, I couldn`t access to the parent (like the modals dialogs), or simply that I could see the parent correctly.
Thank you for your help.

Anonymous

The reason why your widgets disappear is probably that the wait system call blocks your parent process and it cannot return to the main loop to refresh or redraw its widgets. It is not correct to enter a forever loop without giving the X server a chance to handle the expose event.
One way to fix your problem is before you fork the child, you install a handler for the signal SIGCHLD, in the handler, you call the wait to collect the child status. To make you parent behaviour like a modal dialog, you have to desensitize your parent.

ICS_support

The comp.windows.x FAQ, which I just referred to in another thread, has information about how to make this work in terms of shutting down the duplicate X connection.