how to make child to print where the parent is printing using ncurses..
my sample code is
but the child part is not getting printed on the screen..Code:#include <stdio.h> #include <sys/types.h> #include <ncurses.h> int main() { pid_t childPid = 0; WINDOW *mywindow; mywindow = initscr(); keypad(stdscr,TRUE); childPid = fork(); if(childPid ==0) { wprintw(mywindow,"Inside Child\n"); refresh(); return 0; } else { wprintw(mywindow,"Inside Parent\n"); refresh(); } wscanf(mywindow,"%c"); endwin(); wait(); return 0; }
can anyone help me on this?



LinkBack URL
About LinkBacks



