[openbox] Pipe menus and background proccesses

Mikael Magnusson mangosoft at comhem.se
Wed Jan 18 06:37:35 EST 2006


On Wed, 18 Jan 2006, Neil Bird wrote:

> Around about 18/01/06 10:34, Manuel Colmenero typed ...
>>  No luck, openbox waits for this process too :(
>>  The idea is that a pipe outputs "Loading..." and starts an independent
>>  process to download an RSS.
>>  But OB waits for the background process, so it's kind of useless... I've
>>  tried spawning the process, system(".. &"), popen(".. &"), without any
>>  luck so far. The effect is that OB freezes while the RSS is being
>>  downloaded.
>
>  What are you expecting it to do, though?
>
>  From what you've said, you want an RSS-fed submenu.  So, you either have 
> the prog. that generates the submenu go off and get the feed (in which case 
> OB *has* to wait for it, as it can't draw the requested menu), or you have a 
> daemon running elsewhere (I've done this in the past, but not with OB) 
> dumping the feed (obmenu) to a file somewhere, and have your pipe submenu 
> read this file;  then it'll be near-instant, but your feed may lag.

If you run with &, your perl or whatever process probably waits for all 
its child processes, what you want is either nohup command, or command &|, 
or command & disown. Some of these may only work in interactive terminals 
though, unsure.

> - there's an outstanding nicety of having OB delay a little before proffering 
> submenus to prevent unnecessary delays when traversing down the parent menu.

I take it you mean outstanding as in missing, not as in really good, 
because there's no such feature in ob :).

--
Mikael Magnusson



More information about the openbox mailing list