running another application(exe) on another terminal through c program
Hi everyone,
I want to run a c program ,that executes another application on another terminal. ex.on executing a.out in one terminal(pts/1),calls executes another application in another terminal(pts/2). thanks and regards sai |
every process has a parent process and it cannot be changed (just parent can be terminated). So the terminal emulator window where you want to start your app will be the parent (or parent of parent of ...) of your app. From the other hand you can (re)open stdin, stdout to use any (other) terminal - if you have sufficient access permissions.
|
what i am able to do is ,i am able to send data to the another terminal(using open call of file descriptor) , but my question is is it possible execute some .exe there it self.
Thanks and regards, sai |
no, you cannot modify the parent-child chain, so the process started in terminal pts/1 will be the child of that terminal process and any app started in pts/2 will be the child of that terminal. With other words: any app has exactly one parent which started it and it cannot be changed. You can ask a process to start a child (if it was capable to do that), but you cannot start a process and "attach" it to another parent.
|
Quote:
|
check the source of 'openvt' and 'chvt' they might help
|
What do you mean "another terminal"?
A terminal is just a pseudo output device, X terminal, console, a tty, a screen. The question doesn't make sense as stated. |
All times are GMT -5. The time now is 04:38 AM. |