[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Lost process output in pipe between Emacs and CVS
From: |
kevin wang |
Subject: |
Re: Lost process output in pipe between Emacs and CVS |
Date: |
Wed, 24 Jul 2002 09:44:32 -0700 |
From Richard Stallman
> If a buffer flush fails with EAGAIN during
> printf, what should happen?
>
> printf should retry, perhaps after a short sleep, and thus more or
> less emulate the behavior with an ordinary blocking descriptor.
If you want to emulate blocking behaviour, then why not USE blocking
behaviour?
It doesn't make any sense to make the default behaviour of non-blocking
act like blocking.
Now if you wanted to write a library that emulated 'soft-non-blocking'
i.e. retry in a little bit, with a timeout, sure that would be fine,
but blocking is blocking and non-b is non-b. anything inbetween should
be a separate mode.
If you're worried about printf, then use sprintf, dump it to a buffer,
and then feed it out stdio yourself (or with a library or whatever).
> If all stdio output functions handle EAGAIN by sleeping for a short time
> and trying again, most user programs will be happy with the results.
> The few that are not happy are those that should not use stdio.
I disagree. sleeps are inherently evil. stdio is not 'special' that it
needs different handling characteristics than any other file descriptor.
What if stdio had been instead mapped to a file? a pipe? The app simply
cannot tell the difference, and simply cannot be told to act differently
because it's stdio
- Kevin
- Re: Lost process output in pipe between Emacs and CVS, (continued)
- 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 <=
- Message not available
- Re: Lost process output in pipe between Emacs and CVS, Derek Robert Price, 2002/07/24
- Message not available
- Re: Lost process output in pipe between Emacs and CVS, Ian Lance Taylor, 2002/07/24
- 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
- Re: Lost process output in pipe between Emacs and CVS, kevin wang, 2002/07/24
- Re: Lost process output in pipe between Emacs and CVS, Derek Robert Price, 2002/07/24
- Message not available
- Re: Lost process output in pipe between Emacs and CVS, Ian Lance Taylor, 2002/07/24
- Re: Lost process output in pipe between Emacs and CVS, Richard Stallman, 2002/07/25
- Re: Lost process output in pipe between Emacs and CVS, Ian Lance Taylor, 2002/07/25
Re: Lost process output in pipe between Emacs and CVS, Richard Stallman, 2002/07/08