cvs: php4 /ext/standard file.c

From: Date: Fri, 22 Dec 2000 19:26:03 +0000
Subject: cvs: php4 /ext/standard file.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-3246@lists.php.net to get a copy of this message
sas Fri Dec 22 11:26:03 2000 EDT Modified files: /php4/ext/standard file.c Log: Signal an error condition, if write was unable to perform the complete operation. Index: php4/ext/standard/file.c diff -u php4/ext/standard/file.c:1.130 php4/ext/standard/file.c:1.131 --- php4/ext/standard/file.c:1.130 Fri Dec 22 08:39:01 2000 +++ php4/ext/standard/file.c Fri Dec 22 11:26:02 2000 @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: file.c,v 1.130 2000/12/22 16:39:01 sas Exp $ */ +/* $Id: file.c,v 1.131 2000/12/22 19:26:02 sas Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -1688,8 +1688,8 @@ } srcfile = mmap(NULL, sbuf.st_size, PROT_READ, MAP_SHARED, fd_s, 0); if (srcfile != (void *) MAP_FAILED) { - write(fd_t, srcfile, sbuf.st_size); - ret = SUCCESS; + if (write(fd_t, srcfile, sbuf.st_size) == sbuf.st_size) + ret = SUCCESS; munmap(srcfile, sbuf.st_size); goto cleanup; }

« previous php.cvs (#3246) next »