[#444] io_write()/fwrite() and EINTR on Solaris — Jos Backus <jos@...>

I am encountering a problem similar to the one mentioned here,

19 messages 2002/09/06
[#453] Re: io_write()/fwrite() and EINTR on Solaris — nobu.nokada@... 2002/09/08

Hi,

[#454] Re: io_write()/fwrite() and EINTR on Solaris — matz@... (Yukihiro Matsumoto) 2002/09/09

Hi

[#469] Re: io_write()/fwrite() and EINTR on Solaris — Jos Backus <jos@...> 2002/09/09

On Mon, Sep 09, 2002 at 03:55:13PM +0900, Yukihiro Matsumoto wrote:

[#479] Re: io_write()/fwrite() and EINTR on Solaris — Jos Backus <jos@...> 2002/09/10

On Tue, Sep 10, 2002 at 01:04:10AM +0900, Jos Backus wrote:

[#492] Re: io_write()/fwrite() and EINTR on Solaris — Jos Backus <jos@...> 2002/09/21

On Wed, Sep 11, 2002 at 02:23:33AM +0900, Jos Backus wrote:

Re: io_write()/fwrite() and EINTR on Solaris

From: Jos Backus <jos@...>
Date: 2002-09-21 19:24:31 UTC
List: ruby-core #496
    Hello,

On Sun, Sep 22, 2002 at 01:06:51AM +0900, nobu.nokada@softhome.net wrote:
> At Sat, 21 Sep 2002 09:11:59 +0900,
> Jos Backus wrote:
> > As you can see, a bunch of characters are missing between ``host-name=sto''
> > and ``od-children-active=5''. I can think of only one explanation: perhaps
> > fwrite() in io.c:io_write() returns an incorrect count of bytes written when a
> > signal occurs?
> 
> Have you asked Sun about this issue?
 
Not yet, first I want to make sure that this is indeed the issue. I will try
to instrument io_write() to figure out what is going on (e.g. write the data
to stderr -> a file when the fwrite() sees EINTR and compare n and the data
with the actual output). I will report back what I find.

> If fwrite(3) returns an incorrect count, it may mean that we
> have to reimplement it.  But if write(2) does, we can do little
> about it.
> 
> # fputc() and fflush() byte per byte?
 
That would be slower :-(

> Nobu Nakada

Thanks,
-- 
Jos Backus                       _/  _/_/_/      Sunnyvale, CA
                                _/  _/   _/
                               _/  _/_/_/
                          _/  _/  _/    _/
jos at catnook.com        _/_/   _/_/_/          require 'std/disclaimer'

In This Thread