Re: [flimp] popen r+, in ExternalGui .cxx

From: Johannes Hofmann <Johannes.Hofmann_at_gmx.de>
Date: Thu, 29 Oct 2009 18:16:34 +0100

On Thu, Oct 29, 2009 at 01:31:07PM +0100, Johannes Hofmann wrote:
> -------- Original-Nachricht --------
> > Datum: Thu, 29 Oct 2009 11:14:46 +0100
> > Von: George Kourousias <george.kourousias_at_elettra.trieste.it>
> > An: flimp_at_flpsed.org
> > Betreff: [flimp] popen r+, in ExternalGui .cxx
>
> > Problem is ExternalGui (flimp 0.9):
> > I've tried Effects/sigmoidal-contrast, and the default (4) output
> > appears OK.
> > convert -sigmoidal-contrast 4 - - returned 0
> >
> > But when I click GUI, there's a problem:
> > Failed to start flimpgui -s Contrast -r 1,8
> >
> > so in ExternalGui.cxx f->cmd_pipe == NULL. I checked the option of popen
> > and i changed r+ to w
> > line 20: f->cmd_pipe = popen(f->gui_cmd, "w");
> > and then flimpgui appears with the slider on the correct value (4), and
> > byt scrolling it outputs:
> > convert -sigmoidal-contrast 4 - - returned 0
> > convert -sigmoidal-contrast 6 - -
> >
> > convert -sigmoidal-contrast 4.61 - -
> >
> > convert -sigmoidal-contrast 5.28 - -
> >
> > but without a result appearing in the main flimp tabs.
> >
> > it seems that popen is monodirectional r xor w, in many systems. "r+" is
> > not valid.
>
> On what OS are you testing?
>
> >
> > any hints or suggestions would be appreciated.
>
> It seems that read/write mode for popen() is non-standard. If this is true I will add
> an alternative popen() implementation to the flimp sources, e.g. like this
> http://snippets.dzone.com/posts/show/1134

Ouch, just tried it myself and it seems it never worked on Linux. On
*BSD popen() have a read/write option and I'm developing on
DragonFly BSD so I hadn't noticed it.
I will release a fixed version soon.

Thanks for the report,
Johannes
Received on Thu Oct 29 2009 - 18:16:34 CET

This archive was generated by hypermail 2.2.0 : Thu Oct 29 2009 - 18:20:02 CET