studiesrule
March 4th, 2007, 09:35 PM
Hey.
I wanted to know if it is possible to control and handle processes (or programs) through another program. For example, if I wanted to execute, say `ifconfig` in a program, and use that output to some end (find my ip address and print it). More importantly, is it possible to interactively handle a process? The example I can give here is gdb. I want to create a GUI for gdb (based on gtk), where I want to be able to communicate with gdb, to send it a request ("run" or "break" or "disas main"), to take its output and function on it (print all the registers or print the output of "disas main").
I am aware of DBus that does a lot of this, but is there another way? Namely for things like gdb or gcc which does not have DBus integrated in it (or does it? I'm not sure). Also any pointer on usage of DBus would be welcome.
Thanks a lot for the help.
I wanted to know if it is possible to control and handle processes (or programs) through another program. For example, if I wanted to execute, say `ifconfig` in a program, and use that output to some end (find my ip address and print it). More importantly, is it possible to interactively handle a process? The example I can give here is gdb. I want to create a GUI for gdb (based on gtk), where I want to be able to communicate with gdb, to send it a request ("run" or "break" or "disas main"), to take its output and function on it (print all the registers or print the output of "disas main").
I am aware of DBus that does a lot of this, but is there another way? Namely for things like gdb or gcc which does not have DBus integrated in it (or does it? I'm not sure). Also any pointer on usage of DBus would be welcome.
Thanks a lot for the help.