Re: readfile() improvements

From: Date: Tue, 08 Jun 2004 10:51:33 +0000
Subject: Re: readfile() improvements
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-10312@lists.php.net to get a copy of this message
On Tue, 2004-06-08 at 11:32, Alexander Valyalkin wrote: > + /* get the length of local file connected to descriptor fd */ > fstat(fd, &sbuf); [snip] > + if (errno) { Oh-oh! You need to check the return value of fstat(). Errno is only set if fstat() fails (returns -1), otherwise errno keeps its old (junk) value. Best regards, Morten -- Morten K. Poulsen <morten-VxKok5x5@afdelingp.dk>

« previous php.internals (#10312) next »