Hi list!

I've wrote a wiki-article about this two months ago:
http://awesome.naquadah.org/wiki/Run_commands_in_background
It isn't so professional solution but it works in simple cases.

Maybe you can write your solution to wiki ;) Two solutions is more than one.

Cheers,
  Zsolt


2012/4/4 Uli Schlachter <[email protected]>:
> Hi list,
>
> people occasionally complain about awesome awesome.spawn() (and the wrappers
> awful.util.spawn() and spawn_with_shell()). They want more control over the
> argument array that is passed to the new process. They want to handle stdout 
> and
> stderr individually. They want all of this to be non-blocking, so that their 
> WM
> doesn't freeze. They want the child's exist code.
>
> And the coder heard their complaints. But he didn't want to write any code. So
> he asked the almighty Google. Anyway, attached is a sample program which does
> all of the above. This needs lua-ev[0] and luaposix[1]. lua-ev handles the
> non-blocking part (and accidentally integrates with awesome's main loop) while
> luaposix let's us set up pipes, fork and execute a process.
>
> Actually, I lied. To make lua-ev work with awesome, it needs a simple 
> patch[2].
> However, I hope that gets resolved eventually.
>
> So now that I mentioned this, let's see what cool stuff you come up with.
> Actually, I write this mail mostly as a reminder to myself, but whatever.
>
> Cheers,
> Uli
>
> P.S.: Yes, POSIX is not trivial, nor is libev. So what? :-P
>
> [0] https://github.com/brimworks/lua-ev
> [1] https://github.com/rrthomas/luaposix
> [2]
> https://github.com/psychon/lua-ev/commit/7580fb759b8664f6598199eed4ac0c9d70c4352c
> --
> "For saving the Earth.. and eating cheesecake!"

-- 
To unsubscribe, send mail to [email protected].

Reply via email to