running another application(exe) on another terminal through c program
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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).
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.
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.
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.
so what you are saying is i can display the data on another terminal ,but cannot execute .exe in that terminal.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.