On 14/05/2010 22:26, C.DeRykus wrote:
On May 14, 8:15 am, robert...@telkomsa.net (robert Key) wrote:
Hi Eitan, I have just used fflush and it works.
The real problem is that C programme was just a test programme. I am
using someone else's programme and I only have the binary! This makes
life complicated. The only way will be to try and unbuffer output and
then launch the c binary so that it inherits the unbuffereing that I
have set.

AFAICT, there's no way to do that. The launched C program won't
inherit any buffering setting. The problem is  easily  solved if
you've
got the C code and can insert a single call to 'setvbuf'. Or simply
inline the code via Perl's Inline::C.

Otherwise, you'll have to use the suggested 'Expect' module so the
C program thinks it's talking to a terminal rather than through a
pipe.

--
Charles DeRykus

Thanks Charles, yup I I actually didn't think it was possible but I have installed the Expect and Expect-simple modules. Will do a bit of reading there. The C programme I am actually trying to control is jigdo-file. I get some errors on file server on night time scheduled downloads, so I want to contol them as much as possible, making sure the Debian (testing) images I download are all from the same week, checksum errors etc. Thanks a lot,
Cheers,
   Rob Key


--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to