NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: bin/57253: xargs wraps lines after ~4k characters
The following reply was made to PR bin/57253; it has been noted by GNATS.
From: mlelstv%serpens.de@localhost (Michael van Elst)
To: gnats-bugs%netbsd.org@localhost
Cc:
Subject: Re: bin/57253: xargs wraps lines after ~4k characters
Date: Thu, 2 Mar 2023 10:58:44 -0000 (UTC)
marc%fege.net@localhost writes:
>After a certain length of input the 'xargs' command wraps lines automatically after ARG_MAX, as it is described by the man page in paragraph "-s".
>>Fix:
>Replace ARG_MAX limitations with malloc().
This won't work. The executable spawned by xargs has a limit as well
(see NCARGS for execve(2)). Believing in infinite buffer sizes is
always going to fail.
While you could argue that ARG_MAX could at least be equal to NCARGS,
it would often break when the passed argument(s) get expanded by the
spawned command again.
Home |
Main Index |
Thread Index |
Old Index