in reply to FCGI + Inline::C fast stream out!

If you wan to use Perl's IO system, you'll have to use Perl's IO API

Replies are listed 'Best First'.
Re^2: Inline C + IO::Handle
by mrakus (Initiate) on Apr 15, 2009 at 14:01 UTC
    I understand it but could you help me more? :) I try this:
    ... __END__ __C__ void my_print(FILE *f) { fputs("TEXT",f); }
    But its not work too :( Do you have some simple code for me? :)
      Don't use puts/fputs. clib doesn't know anything about Perl. Use the functions such as PerlIO_puts in the linked document instead.
        Ok. I modified code like this:
        void my_print(PerlIO *f) { PerlIO_puts(f,"abcdef"); }
        but it still not work :( Perl "print $out 'TEXT';" work perfect but C "my_print" dot put chars to fastcgi stream. PerlIO_puts return -1 and errno set 9 (Bad file descriptor)