running a shell script from X/Motif appl

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

Questions about motif? Contact us

4 posts / 0 new
Last post
running a shell script from X/Motif appl

Submitted by Anonymous on Mon, 01/07/2002 - 13:00. Developers
I have a X/Motif application from which i should run a shell script upon some action
perfomed ( like button click) . Is it possible in X/Motif ?? if so, how??

The shell script should take the input parameters from GUI and run the script.

Thanks & Regds,
vara

ICS_support

Well, you can certainly use the exec() family of calls in the same way that you would for a non-GUI application. These methods suffer from all the same flaws plus GUI-specific ones -- you probably want to keep the original program running, and, in fact, you probably want to display some results from the shell script.

Anonymous

Hi dbl & others,
I have tried with execl() and it looks fine, But i want to know is there anyother way of
doing this??

Thanks ,
vara.

ICS_support

I guess you could open a pipe to a second program (already running) that does the exec() call, which is slightly better, but it`s pretty much all the same mechanism. You don`t really have too much choice in how to run an external process.