Path: utzoo!attcan!uunet!cs.utexas.edu!sun-barr!rutgers!tut.cis.ohio-state.edu!ucbvax!CUNYVM.CUNY.EDU!dieperink%uliis.unil.ch From: dieperink%uliis.unil.ch@CUNYVM.CUNY.EDU ("Alwin Dieperink, Assistant-Etudiant") Newsgroups: comp.sys.sgi Subject: problems with winopen() Message-ID: <890527165733.2080ecc2@SIC.Epfl.CH> Date: 27 May 89 15:57:33 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 53 Hi, I have the following problem : In the program here under, i want to open a window, and then continue to read data from the keyboard. The data should be echoed in the shell window. (i want to give the program commands to do some drawing in the window i opened). I compiled the program as follow : cc test.c -o test -Zg When i run the program, the window opens normally, and the text "t1" appears in the shell window. But the shell prompt already got back, and i can't anymore give data to my program. When i do a ps from another window, i see that the process still lives. It dies when i type two commands in my shell. I also noticed, that the PID is not the same before and after the winopen. The PPID also changed. It was the shells PID before winopen, and 1 after. Does anyone have an idea ?? Why does winopen() create a new process ? How can I solve that problem ? or did I miss something in the manuals ? Thanks. -- Alwin Dieperink E-Mail : DIEPERINK@ULIIS.UNIL.CH DIEPERINK@ELMA.EPFL.CH ADIEPERI@CLSUNI51.BITNET --------------------------------------------------- #include #include main() { int c; prefposition(200,400,200,400); winopen("test window"); printf("t1\n"); c = getchar(); while (c != EOF) { putchar(c); c = getchar(); } } ----------------------------------------------------