Steve Hay <[EMAIL PROTECTED]> writes: >>> >>You need to use PerlSIO_fxxxxx() for Standard IO under >>PERL_IMPLICIT_SYS. >> >One further question on this subject: > >I also a have corresponding function that works with low-level i/o >routines. It gets an int file descriptor back from a library function >that it calls and then tries to PerlIO_fdopen() that to get a PerlIO *. > >As in the above code, it tidies up in the case of PerlIO_fdopen() >failing my close()ing the now-useless fd. > >My question is: are there any circumstances under which the close(fd) >should be PerlLIO_close(fd)? > >Compiling under Perl 5.8.0 with PERL_IMPLICIT_SYS does not appear to >cause any problem with close() like it did with fclose(), but are there >other are situations that I need to be aware of?
I believe it is correct to always use PerlLIO_close() - perlio.c does ;-) You may be escaping trouble due to #define in XSUB.h Now I have spotted those #define-s I think they need fixing for stdio case under perl5.8 > >Thanks, > >Steve -- Nick Ing-Simmons http://www.ni-s.u-net.com/
