PDA

View Full Version : Programming incorporating outside programs?


tht00
August 26th, 2006, 02:09 PM
Ok. I'm kinda curious about this -- how does one invoke another program on the system? It's quite easy to do within a script, but can this be done from within, say, a C program?

I'm less curious about this, but what about building GUIs on top of console apps?

neilp85
August 26th, 2006, 02:15 PM
It's possible to do within C programs. Have look at the documentation for execl and fork. Those are the only two I've ever used.

peabody
August 27th, 2006, 12:59 PM
I'm less curious about this, but what about building GUIs on top of console apps?

This is done all the time in Unix, in fact, it's probably the most common form of GUI, wrapping command line programs into nice guis.

tht00
August 27th, 2006, 03:47 PM
This is done all the time in Unix, in fact, it's probably the most common form of GUI, wrapping command line programs into nice guis.

Yeah, I was curious more on the how it's done -- I about having console apps first with GUIs built later (ie, K3B and GnomeBaker are likely the same backend/terminal program with a different GUI (gnome/qt) and different configurable options.)

execl and fork look more of what I'm interested in right now. Thanks!