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

From: George Kourousias <george.kourousias_at_elettra.trieste.it>
Date: Fri, 30 Oct 2009 11:03:51 +0100

Hi Johannes, thanks for your response :-)
Indeed BSD allows (almost) directional I/O while linux does not. Other
than the solution you mentioned
(http://snippets.dzone.com/posts/show/1134) , pstreams(
http://pstreams.sourceforge.net/ ) could be considered too. The project
suggests that pstreams may serve as an alternative to popen, including
standard C++ interface and bidirectional I/O.
Again, thanks for all the effort you've put to this nice piece software.
cheers,
George

On Thu, 2009-10-29 at 18:16 +0100, Johannes Hofmann wrote:
> 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 Fri Oct 30 2009 - 11:03:51 CET

This archive was generated by hypermail 2.2.0 : Fri Oct 30 2009 - 11:05:01 CET