On Thu, Oct 7, 2010 at 6:53 AM, john skaller <skal...@users.sourceforge.net> wrote: > > On 08/10/2010, at 12:19 AM, john skaller wrote: > > OMG I have narrowed the bug down to this: > > system(cmd + ">tmp.out"); > output = load_file("tmp.out"); > > where cmd is a flx_pkgconfig command. > > I have NO idea why this doesn't work. However it is definitely failing. > Flx_pkgconfig is producing the correct results when run manually. > > tmp.out is DEFINITELY wrong. The value left over at the failure point is > completely out of whack, it's the result from several calls to flx_pkgconfig > back. > > My load file routine is defined in src/rtl/flx_ioutil.cpp, it uses fgets and > seems correct. > Which leaves the possibility that the system() command isn't flushing stdout > to disk? > ??? I am lost (we should be using popen, but I've hacked it to use the Windows > code, which was easier to translate to Felix without handling all the rubbish > around > using popen on 20 different Unix platforms). > > Hmmm ...
Are you checking the return code from system? Maybe it's erroring out for some reason before it even executes. Could also throw in a "rm tmp.out" after you load it to make sure you aren't reading in old values. ------------------------------------------------------------------------------ Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today. http://p.sf.net/sfu/beautyoftheweb _______________________________________________ Felix-language mailing list Felix-language@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/felix-language