Sujet : Re: Case Insensitive File Systems -- Torvalds Hates Them
De : invalid (at) *nospam* invalid.invalid (Richard Kettlewell)
Groupes : comp.os.linux.miscDate : 03. May 2025, 15:59:24
Autres entêtes
Organisation : terraraq NNTP server
Message-ID : <wwvplgp68qb.fsf@LkoBDZeT.terraraq.uk>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13
User-Agent : Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
The Natural Philosopher <
tnp@invalid.invalid> writes:
On 02/05/2025 17:41, Richard Kettlewell wrote:
The Natural Philosopher <tnp@invalid.invalid> writes:
I LOVE spaces in filenames.
I guess if you use the command line a lot and parse file arguments
using spaces, its a bit irritating.
>
But if you uses a GUI its no issue at all
Quite. It’s only shell that has a problem with spaces, so it seems
like it’s not the spaces that are the problem, but the language.
To be fair its built in to the C language as well in the sense that
that's how argc and argv[] are created.
Not really. As far as C is concerned, it’s just an array of strings; how
it’s created is someone else’s problem. Who the ‘someone else’ is
depends on the platform...
In Unix, the space-based splitting is part of the shell. What you pass
to execve() is an array of strings, so if you can keep the shell out of
the picture, you get to specify exactly what appear in the child
program’s argv without any extra parsing or formatting being involved.
In Windows, the splitting is instead part of the language runtime, since
CreateProcess() takes a single command line string. The child process’s
runtime does the splitting (according to rules complicated enough to
result in vulnerabilities) - or not, if WinMain() is used.
-- https://www.greenend.org.uk/rjk/