how to test if a pipe contains data

Christof Warlich christof at warlich.name
Tue Jan 24 18:47:58 UTC 2012


Am 24.01.2012 00:27, schrieb Rich Felker:
> Note that all of these approaches have a nasty race condition where
> new data might get written to the pipe (and lost) after it's saved..
> You really should find a more robust, professional solution. Ugly
> hacks like this are the reason so many embedded systems behave so
> poorly.
>
> Rich
Right, hacks like that are to be avoided _if_ possible. And the
"professional" way of dealing with this issue would be to fix the
UMTS driver. But unfortunately, I don't have its source code.
And honestly, even if I had it: Life is too short to dig into anything
that's buggy.

Anyhow, Gilles suggestion might be an acceptable compromise.


More information about the busybox mailing list