andye has asked for the wisdom of the Perl Monks concerning the following question:
I'm using Inline::Pdlpp (similar to Inline::C) on a Unix platform.
Inside the C code, I print some stuff out using printf().
This works fine normally, but when I redirect output to a file, the output disappears. I.e. when I do:
the file output.txt does contain the text that was printed from Perl, but doesn't contain anything printed from C. The C output doesn't appear on the terminal either../perlscript.pl > output.txt &
So I'm a bit mystified. Any clues?
(My script doesn't mess with STDOUT at all, I'm not doing anything peculiar. I'm a pretty inexperienced C programmer though, so maybe I'm missing something there - I don't need to explicitly select STDOUT in C, do I? I'm guessing not as when the script is run without redirecting the output, everything is fine).
Thanks and best wishes, andye
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Inline: where did the output go?
by cdarke (Prior) on Jun 12, 2007 at 13:39 UTC | |
by andye (Curate) on Jun 12, 2007 at 14:25 UTC | |
by Anonymous Monk on Jun 12, 2007 at 14:36 UTC | |
by andye (Curate) on Jun 13, 2007 at 12:01 UTC | |
Re: Inline: where did the output go?
by Moron (Curate) on Jun 12, 2007 at 12:16 UTC | |
by andye (Curate) on Jun 12, 2007 at 14:14 UTC | |
Re: Inline: where did the output go?
by sen (Hermit) on Jun 12, 2007 at 10:59 UTC | |
by andye (Curate) on Jun 12, 2007 at 11:37 UTC | |
Re: Inline: where did the output go?
by Grundle (Scribe) on Jun 12, 2007 at 17:48 UTC | |
by Grundle (Scribe) on Jun 12, 2007 at 17:49 UTC | |
by andye (Curate) on Jun 13, 2007 at 11:57 UTC |