LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-03-2011, 08:19 PM   #1
svm
LQ Newbie
 
Registered: Nov 2010
Posts: 8

Rep: Reputation: 0
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
 
Old 03-03-2011, 08:21 PM   #2
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 280Reputation: 280Reputation: 280
You might be able to accomplish this with screen.
 
1 members found this post helpful.
Old 04-01-2011, 04:41 PM   #3
svm
LQ Newbie
 
Registered: Nov 2010
Posts: 8

Original Poster
Rep: Reputation: 0
Thank you, I could switch between processes and the shell, very easily using the utility.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
terminal forking and interrupts Curtor Programming 1 12-06-2008 03:52 PM
Newbie on forking child process and I/O redirection neo_in_matrix Programming 4 09-16-2005 04:05 AM
Forking process using python thinkgeek Programming 4 07-03-2005 12:36 PM
Question on forking a child process brianvdc Programming 2 10-16-2003 05:07 AM
Starting a forking program in terminal Ztyx Linux - General 2 11-09-2002 06:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration