Re: spawn functions?

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

From: haratron <haratron gmail com>
Subject: Re: spawn functions?
To: "Sergei Steshenko" <sergstesh yahoo com>
Cc: gtk-perl-list gnome org
Date: Friday, April 13, 2012, 9:38 AM
What do you mean by shared memory?
Can you give a code example?

On Thu, Apr 12, 2012 at 10:48 PM, Sergei Steshenko <sergstesh yahoo com>

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

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

it seems that the spawn* functions of Gtk have not
ported to gtk2-perl.
I have this problem where I need to launch an
process from a
button's click callback. It's a TTS (text to
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..).
gtk-perl shouldn't block, so that I am able to e.g.
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
- GUI doesn't block (usually when I'm forking from
callback) but once the python script is done
speaking, the
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

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


I won't give a code example because it's a proprietery project.

Regarding "What do you mean by shared memory?" - for example, Yahoo web search in response to

Linux shared memory

search terms yields, among others, the following matches:

Try to enter

shared memory

into .

My routines are actually written in "C" and are linked to my Perl script using "Inline::C" module, but one 
can access shared memory from Perl directly.


P.S. An acquaintance   of mine, a CTO, typically does _not_ ask "what is FOO", he rather asks "what are the 
search terms to to learn about FOO".

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