On Thu, 12 Apr 2012 05:25:27 +1000 David Seikel <[email protected]> wrote:
> On Wed, 11 Apr 2012 21:01:39 +0200 Davide Andreoli > <[email protected]> wrote: > > > Il giorno 09 aprile 2012 00:55, Enlightenment SVN < > > [email protected]> ha scritto: > > > > > Log: > > > New gadget that displays results of a command line > > > > > > This gadget is inspired by Geektool for Mac OS. > > > Yet, it misses > > > - A GUI font configuration (/inline styles for edje > > > TEXTBLOCKs?) > > > - Display/refresh of images > > > > > > Author: leif > > > Date: 2012-04-08 15:55:43 -0700 (Sun, 08 Apr 2012) > > > New Revision: 69958 > > > Trac: http://trac.enlightenment.org/e/changeset/69958 > > > > > > > > > > > Wow, finally something new for e! I like the idea of the module, I > > always missed > > that feature :) cool...then I tryed it... > > > > I put in the config to execute: "ping n.nu", pressed ok....wow E > > hangs there executing the ping... > > ok, restart E, obviously still hanged as the module restart a new > > ping. The only way to restore > > my system is to remove the module.so and restart...or fully remove > > my E config GRRRRR > > I cant believe... :( > > > > You are executing the command in the E process. This is not good at > > all, I can think of thousand > > of commands that will badly block my system. > > > > The module MUST execute the command in an async way!! > > I've not actually looked at this new module, but ecore_exe_pipe_run() > might be worth looking at. I pretty much wrote similar code > yesterday, using ecore_exe_pipe_run() to run the command line, then > getting ecore events for the commands output. Alas the code I wrote > is for a contract and I can't show it. > > The ancient emu module would run some program and use it's output to > generate e17 module content. It's in OLD/E-MODULES-EXTRA/emu in SVN, > and might be worth reading. Did actually look at it, eektool does indeed run the command async, using popen(). The problem is that it loops waiting for the command output to end (or grow above 4k), and then calls pclose(), which waits for the command to end. So yeah, things like a ping command that don't end will lock it up. ecore_exe_pipe_run() is your friend. You can easily find examples of it's use in SVN. -- A big old stinking pile of genius that no one wants coz there are too many silver coated monkeys in the world.
signature.asc
Description: PGP signature
------------------------------------------------------------------------------ For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
