bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug #67624] echo: write error: Invalid argument


From: Mike Jonkmans
Subject: Re: [bug #67624] echo: write error: Invalid argument
Date: Sun, 26 Oct 2025 09:53:37 +0100

On Thu, Oct 23, 2025 at 07:35:38PM -0400, Pepper Gray wrote:
> URL:
>   <https://savannah.gnu.org/bugs/?67624>
> 
> -------------------------------------------------------
> Date: Thu 23 Oct 2025 11:35:32 PM UTC By: Pepper Gray <peppergrayxyz>
> Writing to the kernel causes an error, when appending '\n', when bash is
> linked against musl. e.g.:
> 
> > # strace -f -o 'strace-remove.log' bash -c 'echo "-1" >
> > /proc/sys/fs/binfmt_misc/qemu-riscv64'
> > bash: line 1: echo: write error: Invalid argument
> 
> This behavior seems to be present for a long time:
> https://www.openwall.com/lists/musl/2013/05/05/1
> 
> Traces for the failing commands are available in the downstream bug report:
> https://bugs.gentoo.org/964994

It seems that this is a consequence of the kernel handling writes to /proc/...
The musl implementation makes it two separate write calls,
which the kernel does not accept.

I don't think that bash should solve this (even if it could).

-- 
Regards, Mike Jonkmans



reply via email to

[Prev in Thread] Current Thread [Next in Thread]