problems with winopen()

Alwin Dieperink, Assistant-Etudiant dieperink%uliis.unil.ch at CUNYVM.CUNY.EDU
Sun May 28 01:57:33 AEST 1989


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 at ULIIS.UNIL.CH
         DIEPERINK at ELMA.EPFL.CH
         ADIEPERI at CLSUNI51.BITNET

---------------------------------------------------

#include <stdio.h>
#include <gl.h>

main()
{
        int     c;

        prefposition(200,400,200,400);
        winopen("test window");
        printf("t1\n");

        c = getchar();
        while (c != EOF) {
                putchar(c);
                c = getchar();
        }
}

----------------------------------------------------



More information about the Comp.sys.sgi mailing list