cvs: php4 /ext/session/ mod_files.c
| From: | Sascha Schumann | Date: | Mon, 15 May 2000 13:50:39 +0000 |
| Subject: | cvs: php4 /ext/session/ mod_files.c | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-15045@lists.php.net to get a copy of this message | ||
sas Mon May 15 15:50:39 2000 EDT
Modified files:
/php4/ext/session mod_files.c
Log:
Complain, if write(2) failed.
Index: php4/ext/session/mod_files.c
diff -u php4/ext/session/mod_files.c:1.30 php4/ext/session/mod_files.c:1.31
--- php4/ext/session/mod_files.c:1.30 Sun Apr 30 21:01:17 2000
+++ php4/ext/session/mod_files.c Mon May 15 15:50:39 2000
@@ -260,7 +260,10 @@
ftruncate(data->fd, 0);
lseek(data->fd, 0, SEEK_SET);
- write(data->fd, val, vallen);
+ if (write(data->fd, val, vallen) != vallen) {
+ php_error(E_WARNING, "write failed: %m (%d)", errno);
+ return FAILURE;
+ }
return SUCCESS;
}