[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Lost process output in pipe between Emacs and CVS
From: |
Ian Lance Taylor |
Subject: |
Re: Lost process output in pipe between Emacs and CVS |
Date: |
09 Jul 2002 12:09:06 -0700 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
Richard Stallman <rms@gnu.org> writes:
> CVS uses stdio, and stdio doesn't work very well with non-blocking
> file descriptors. CVS can detect the error easily enough, but at that
> point stdio has already thrown away the buffer full of data, and CVS
> hasn't recorded it anywhere. While in principle CVS could switch to
> not use stdio, that would be a fairly substantial change.
>
> Many programs use stdio, and these programs ought to work when run
> under ssh. This suggests that ssh and stdio are responsible for the
> problem, and one or the other of them should be fixed.
When programs are run under ssh, they will work correctly.
This is a different case. CVS is invoking ssh in a child process in a
way which causes them to share file descriptor 2. ssh is then
unblocking file descriptor 2 in a way which CVS does not expect. This
type of problem can only happen with programs which invoke ssh.
> It would be best to fix stdio, I think. What platform is CVS running
> on when it fails? Does stdio in GNU libc handle non-blocking file
> descriptors properly? If not, we can fix it.
The failure which I see occurs on GNU/Linux using GNU libc 2.2.5.
Specifically, in new_do_write() in libio/fileops.c, if the call to
_IO_SYSWRITE() (i.e., write()) fails for any reason, including EAGAIN,
the contents of the output buffer are discarded.
Ian
- Lost process output in pipe between Emacs and CVS, Stefan Monnier, 2002/07/08
- Re: Lost process output in pipe between Emacs and CVS, Ian Lance Taylor, 2002/07/08
- Re: Lost process output in pipe between Emacs and CVS, Ian Lance Taylor, 2002/07/08
- Re: Lost process output in pipe between Emacs and CVS, Richard Stallman, 2002/07/08
- Re: Lost process output in pipe between Emacs and CVS, Richard Stallman, 2002/07/11
- Re: Lost process output in pipe between Emacs and CVS, Derek Robert Price, 2002/07/19
- Re: Lost process output in pipe between Emacs and CVS, Larry Jones, 2002/07/19
- Re: Lost process output in pipe between Emacs and CVS, Stefan Monnier, 2002/07/19
- Re: Lost process output in pipe between Emacs and CVS, Ian Lance Taylor, 2002/07/19
- Re: Lost process output in pipe between Emacs and CVS, Richard Stallman, 2002/07/21
- Re: Lost process output in pipe between Emacs and CVS, kevin wang, 2002/07/24
- Message not available
- Re: Lost process output in pipe between Emacs and CVS, Derek Robert Price, 2002/07/24