Ibrahim Haddad wrote:

> I have a small problem with the system call (system"xterm").
> I have a motif program with menu and a toolbar. in the utilities
> menu, the user can evoke a system call to xterm. now, whenever the
> user choses to get an xterm, the shell appears, but it erases all the 
> menu and toolbar when i scolled it above them. when i exit from the
> shel the menu and the toolbar icons re-appears!
> 
> Why is this happening? and how to prevent it?

What is happening is that system() waits for the command to complete
before continuing. During this period your application is suspended.

If you don't need to wait, then put an ampersand at the end of the
command, i.e.

        system("xterm &")

If you do need to wait, then you'll need to call waitpid()
periodically.

-- 
Glynn Clements <[EMAIL PROTECTED]>

Reply via email to