Re: cvs: php4 /ext/standard file.c
| From: | Andi Gutmans | Date: | Fri, 22 Dec 2000 17:55:55 +0000 |
| Subject: | Re: cvs: php4 /ext/standard file.c | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-3234@lists.php.net to get a copy of this message | ||
At 06:43 PM 12/22/00 +0100, Sascha Schumann wrote:
Uhm, I obviously meant that if the process doesn't get terminated. Not on all systems do you get a signal if the disk is full. On Linux as far as I remember, write() returns an error code. Not that this has anything to do with what I said in the first place. On systems which send you a signal you'll also get a signal in both cases.On my Linux:Andi, would you mind educating yourself before making further comments? "On Linux as far as I remember, .." does not sound as if you are really familiar with the semantics of write(2).The API you are proposing has one problem: You cannot detect reliably why write() did not write out as many bytes as you specified. You cannot tell reliably whether retrying is necessary (write only returns -1 and sets errno to EINTR, if it has not written a single byte yet), or whether it is harmful (SIGXFSZ).
EINTR The call was interrupted by a signal before any data was written.
ENOSPC The device containing the file referred to by fd has no room for the data.As you can see you can tell on this OS. And I am quite aware of the semantics of write() :) I admit I don't know how write() behaves on each UNIX system on the market but then again I doubt you know each system yourself. Andi --- Andi Gutmans <andi@zend.com> http://www.zend.com/