[Problem] ash: Errorneus write() retries when kernel returns -EBUSY
Baruch Siach
baruch at tkos.co.il
Wed Nov 16 07:23:19 UTC 2011
Hi Denis,
On Wed, Nov 16, 2011 at 12:18:51AM +0200, Denis Kuzmenko wrote:
> Such retries are seen when issuing in ash:
> echo 37 > /sys/class/gpio/export
[snip]
> specially:
>
> write(1, "37\n", 3) = -1 EBUSY (Device or resource busy)
> write(1, "3", 1) = -1 EBUSY (Device or resource busy)
> write(1, "3", 1) = -1 EBUSY (Device or resource busy)
>
> Busybox version used v1.18.4, compiled by Buildroot 2011.05 for
> arm-unknown-linux-uclibcgnueabi target using GCC 4.6.0.
>
> Can someone suggest me a way to track that?
This behaviour comes from the uClibc implementation of fputs(). Since commit
8ee2adab21328761b80e0cbc513eda7eaa880b24 (echo: do not retry on write errors),
which is present in v1.19, Busybox echo uses the lower level write() system
call for output, so it should work correctly even with uClibc.
baruch
--
~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
More information about the busybox
mailing list