From: Nicholas Clark Date: Mon, 13 Nov 2000 18:55:04 +0000 (+0000) Subject: Re: [ID 20001112.008] perlio.c's PerlIO_getpos ingores error return X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=54d9745e6c10264c5b7e27933a7a229432a2760e;p=p5sagit%2Fp5-mst-13.2.git Re: [ID 20001112.008] perlio.c's PerlIO_getpos ingores error return Message-ID: <20001113185504.J29183@plum.flirble.org> p4raw-id: //depot/perl@7676 --- diff --git a/ext/IO/lib/IO/Handle.pm b/ext/IO/lib/IO/Handle.pm index 9266f33..fb754a6 100644 --- a/ext/IO/lib/IO/Handle.pm +++ b/ext/IO/lib/IO/Handle.pm @@ -157,15 +157,15 @@ operates on the file descriptor (similar to sysread, sysseek and systell). This means that any data held at the perlio api level will not be synchronized. To synchronize data that is buffered at the perlio api level you must use the flush method. C is not implemented on all -platforms. Returns 0 on success, -1 on error, -1 for an invalid handle. -See L. +platforms. Returns "0 but true" on success, C on error, C +for an invalid handle. See L. =item $io->flush C causes perl to flush any buffered data at the perlio api level. Any unread data in the buffer will be discarded, and any unwritten data -will be written to the underlying file descriptor. Returns 0 on success, -or a negative value on error. +will be written to the underlying file descriptor. Returns "0 but true" +on success, C on error. =item $io->printflush ( ARGS ) @@ -200,7 +200,8 @@ the order of global destruction is undefined, so even if your buffer variable remains in scope until program termination, it may be undefined before the file IO::Handle is closed. Note that you need to import the constants C<_IOFBF>, C<_IOLBF>, and C<_IONBF> explicitly. Like C, setbuf -returns nothing, setvbuf returns 0 on success, -1 on failure. +returns nothing. setvbuf returns "0 but true", on success, C on +failure. Lastly, there is a special method for working under B<-T> and setuid/gid scripts: diff --git a/ext/IO/lib/IO/Seekable.pm b/ext/IO/lib/IO/Seekable.pm index 77e0c3a..243a971 100644 --- a/ext/IO/lib/IO/Seekable.pm +++ b/ext/IO/lib/IO/Seekable.pm @@ -31,7 +31,7 @@ using C's ftell() function. =item $io->setpos Uses the value of a previous getpos call to return to a previously visited -position. Returns 0 on success, -1 on failure. +position. Returns "0 but true" on success, C on failure. =back