Hi, I'm having some trouble getting one of my gtk perl programs to run. More specifically, I'm having trouble when I try to fork() and use Gtk at the same time. My main goal is to construct an app that does gui work in the parent and extra work in the child. However, I'm getting the "Broken pipe" error when I try and use Gtk after forking. Interestingly, I noticed that the program works if I "init Gtk" *after* doing the fork. Yet it seems to me that it should work both times. Does anyone know why this behavior might happen? Below is an example run. Please run the attached code and let me know how it works for you. Thanks for your time, any help is appreaciated. $ ./gtk_fork.pl -at_start -fork Calling at start Child Pid 21323 just read this: `Parent Pid 21322 is sending this' Parent Pid 21322 just read this: `Child Pid 21323 is sending this' got here Broken pipe $ $ ./gtk_fork.pl -at_start Calling at start got here got there $ $ ./gtk_fork.pl -at_end -fork Child Pid 21326 just read this: `Parent Pid 21325 is sending this' Parent Pid 21325 just read this: `Child Pid 21326 is sending this' Calling at end got here got there $ $ ./gtk_fork.pl -at_end Calling at end got here got there -- ~'`^`'~=-.,__,.-=~'`^`'~=-.,__,.-=~'`^`'~=-., \|/ (___) \|/ _,.-=~'`^` Brian Medley @~./'O o`\.~@ "Knowledge is Power" brian medley verizon net /__( \___/ )__\ *PPPFFBT!* -- Francis Bacon `\__`U_/' _,.-=~'`^`'~=-.,__,.-=~'`^`'~=-.,__,.-=~'`^`'~= <____|' ^^`'~=-.,__,.-= ~`'^`'~=-.,__,.-=~'`^`'~=-.,__,.-=~'`^`'~=-.,__,.-==--^'~=-.,__,.-=~'`^`
Attachment:
gtk_fork.pl
Description: Text document