[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: [Problem] ash: Errorneus write() retries when kernel returns
From:       Baruch Siach <baruch () tkos ! co ! il>
Date:       2011-11-16 7:23:19
Message-ID: 20111116072319.GA10335 () sapphire ! tkos ! co ! il
[Download RAW message or body]

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@tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic