From: Koichi S. <koi...@gm...> - 2014-07-24 05:55:41
|
Thanks a lot for pointing out. Could you submit a patch for this? 2014/07/24 13:09 "Pavan Deolasee" <pav...@gm...>: > Hello All, > > AFAICS that pgxc_ctl uses popen() at many places to execute a command and > sometimes to also parse back the output. I've been chasing a bug that would > cause subsequent reads on the FILE * returned by popen() to return EOF. > After some investigations, it seems that the correct way to close the file > descriptor returned by popen() is to use pclose() which fclose() does not > reset the pipe state properly whereas pclose() does. The current XC code > uses fclose() instead which probably works fine on some platforms such as > Linux, but fails on other such as Mac OSX. > > Should we consider replacing fclose() with pclose() for pipes opened by > popen()? > > Thanks, > Pavan > > -- > Pavan Deolasee > http://www.linkedin.com/in/pavandeolasee > > > ------------------------------------------------------------------------------ > Want fast and easy access to all the code in your enterprise? Index and > search up to 200,000 lines of code with a free copy of Black Duck > Code Sight - the same software that powers the world's largest code > search on Ohloh, the Black Duck Open Hub! Try it now. > http://p.sf.net/sfu/bds > _______________________________________________ > Postgres-xc-developers mailing list > Pos...@li... > https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers > > |