[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

parent & child print in different part of same window

From: gibsosmat
Subject: parent & child print in different part of same window
Date: Tue, 6 Nov 2007 02:16:02 -0800 (PST)

I am trying to make a shell like program (its my assignment involving signals
& forking)..
It takes commands from user and executes accodingly..
the commands will be
1) createchild: creates a child proecess (fork) and keeps track of the child
pid with interger {1, 2, 3,..., MAX_CHILD}
2) runchild <child_no> -t <time_to_run> -m <virtual_time/real_time>: this
runs a specific child for the specified time using signals SIGSTOP, SIGCONT.
3) sleepchild <childNo> -t <time_to_sleep> -m <virtual_time/real_time>: this
is same as above.. it makes the child to sleep for time_to_sleep time

now I will come to the problem.. the child as the assignment specifies that
should have a print statement in an infinite for loop like "Child i

now I want to make these printing in a different part of the window.. so
that the user can see what he is typing as command..

but I have no idea how to use ncurses with fork command.. parent and child
are not sharing the same windows. (I thought they will share just like some
file descs stdout.)

can anyone help me with this? how to implement it in c programming?
Assume that I am able to make the signal and stuff working fine.. 
how do I print the output at my own specified point..
Thanks in advance
View this message in context: 
Sent from the Gnu - Ncurses mailing list archive at Nabble.com.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]