Re: spawn functions?





--- On Thu, 4/12/12, haratron <haratron gmail com> wrote:

From: haratron <haratron gmail com>
Subject: spawn functions?
To: gtk-perl-list gnome org
Date: Thursday, April 12, 2012, 11:46 AM
Hello,

it seems that the spawn* functions of Gtk have not been
ported to gtk2-perl.
I have this problem where I need to launch an external
process from a
button's click callback. It's a TTS (text to speech)
application that
has play, pause and stop buttons. The actual speech is been
done by a
python script that I need to execute (don't ask..). The GUI
in
gtk-perl shouldn't block, so that I am able to e.g. press
pause/stop
while the voice speaks. I've tried a lot of ways but it
always ends up
to one of the following:
- GUI gets blocked and I can't press pause/stop buttons
- GUI doesn't block (usually when I'm forking from within
the
callback) but once the python script is done speaking, the
gtk-perl
GUI is closed as well. I read this is a problem of gtk and
there are
the spawn* functions to compensate for that.

How can I do this?
_______________________________________________
gtk-perl-list mailing list
gtk-perl-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list


I do this using shared memory.

My gtk+ Perl script sets a flag in shared memory that new data is available (after making it available) and 
the consumer process monitors the flag and grabs the new data when it sees the set flag.

There is also an acknowledge mechanism, i.e. the IPC is bidirectional.

Regards,
  Sergei.



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