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

Re: fork only forks out problems



bals ji <gtksophists@yahoo.com> writes:
> I am trying to implement a vt100 emulator using gtk ..
> i have opened a top level window with a text widget in

It's impossible to implement a vt100 emulator using a text widget,
I'll go ahead and warn you. If I were doing this I would make the
xterm sources into a library that could be used in a GTK widget.

> it and after that i fork a child process with 
>      gtk_main() in it..
> 
> in the parent when i try to insert some text into the
> text widget .. i get  the following error
>  
>            Gdk-ERROR **: BadIDChoice (invalid resource
> ID chosen for this connection)
>        serial 222 error_code 14 request_code 1
> minor_code 0
> 
> I have even used _exit() in the child ....
> the synopsis of the program is as follows..
> 
> 
> main()
> {
>    .... create windows and text widget .....
> 		
> 	fork() 
> {
> 	child:
> 		fork()
> 		{	grandchild:
> 				  exec telnet
> 			child:
> 				gtk_main();

The child is sharing an X connection with the parent; won't work at
all. Child should simply reap the grandchild then _exit(). (note
underscore prefix)

Havoc




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