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: Chet Ramey
Subject: Re: [bug #67624] echo: write error: Invalid argument
Date: Tue, 28 Oct 2025 12:40:34 -0400
User-agent: Mozilla Thunderbird

On 10/28/25 5:00 AM, Andreas Schwab wrote:
On Okt 28 2025, Martin D Kealey wrote:

laas:~# cat t.sh
#!/bin/bash
echo 60 > /proc/sys/kernel/panic
laas:~# strace -f t.sh
...
writev(1, [{"60", 2}, {"\n", 1}], 2) = 2
writev(1, [{"", 0}, {"\n", 1}], 2) = -1 EINVAL (Invalid argument)

Where is the second writev coming from?  "echo 60" should output
$'60\n', and nothing else.

libc. Bash uses stdio.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature


reply via email to

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