Dear visitor, welcome to KDE-Forum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.
Quoted
I'm a bit lost on threads.
I'd like to start an app in Linux, release it, let it run in the background, then reconnect to it and read its output.
Is it possible?
The main app would work as a frontend to the Linux app.
This post has been edited 1 times, last edit by "wysota" (Aug 18th 2004, 1:50pm)
Quoted
Originally posted by wysota
Doesn't the external process get killed if the parent process (Qt app) ends?
Quoted
And how to reconnect to stdin/stdout of an already running process? It isn't that easy if this "linux app" doesn't support its own IPC handling.
Quoted
Originally posted by wysota
If it really is a child process, you should get a SIGCHLD posix signal when the child process ends (not to be confused with Qt signals of course).
There is a way to do the thing with quitting the application and then reconnecting - you need another app, that will be a controller of theese child processes. You don't fork theese from your "monitor" app, but from the controller one.... It has to run during the life of all children and it has to provide a way to communicate with theese processes (like a Unix domain socket, messages or shared memory), then you can send commands to such controller to spawn a child, kill it, monitor it and so on.
This post has been edited 1 times, last edit by "wysota" (Aug 21st 2004, 10:11am)
Forum Software: Burning Board®, developed by WoltLab® GmbH
Linux Computer - Linux Forum -
Linux Computer und Notebooks - Lastminute - Wasserbetten & Whirlpools