LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Forking a process into a new terminal (https://www.linuxquestions.org/questions/linux-software-2/forking-a-process-into-a-new-terminal-866330/)

svm 03-03-2011 08:19 PM

Forking a process into a new terminal
 
Hi,

I am trying to create two processes , a parent process and a child process where each of them have their respective CLI. At any point, the user should be able to switch between the CLI of the parent and child processes. I could find three possible approaches to the problem
1) fork the child process into a new terminal
2) activate the CLI of only the process which is currently in the foreground.
3) Write a script (.bashrc triggers this script on login) to start the two processes separately in two different terminals, such that the second process is triggered once the first process reaches a certain stage in execution.

The first approach probably requires the controlling terminal of the child process to be changed. Can this be achieved ?
The second approach will require for the process (parent/child) to itself to know everytime it is put in background / foreground so that its CLI operations can be suspended/resumed respectively. Is this possible?
Can a script start programs in a new terminal other than the one it is running in?

Please provide your inputs.

Thank you for your time,
Srividya

pljvaldez 03-03-2011 08:21 PM

You might be able to accomplish this with screen.

svm 04-01-2011 04:41 PM

Thank you, I could switch between processes and the shell, very easily using the utility.


All times are GMT -5. The time now is 09:34 PM.