This is the mail archive of the
mailing list for the glibc project.
[Bug locale/25195] localedef does not return error status when warnings were issued.
- From: "carlos at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Sat, 16 Nov 2019 00:43:00 +0000
- Subject: [Bug locale/25195] localedef does not return error status when warnings were issued.
- Auto-submitted: auto-generated
- References: <firstname.lastname@example.org/bugzilla/>
--- Comment #2 from Carlos O'Donell <carlos at redhat dot com> ---
(In reply to Sergei Trofimovich from comment #0)
> # /usr/bin/localedef -c --no-archive -i en_US -f $'ISO-8859-1\r' -A
> /usr/share/locale/locale.alias --prefix / en_US |& cat -v
> failed to set locale!
> [error] character map file `ISO-8859-1^M' not found: No such file or
> # echo $?
You ran two commands. The $? is the exit code of the second command in the
pipe. The exit code of cat was 0 (success) which is expected.
If you run just the localedef command:
/usr/bin/localedef -c --no-archive -i en_US -f 'ISO-8859-1\r' -A
/usr/share/locale/locale.alias --prefix / en_US
[error] character map file `ISO-8859-1\r' not found: No such file or directory
[error] cannot write output files to `//usr/lib/locale/en_US/': Permission
You get output 4 as expected because errors were encountered and no output was
Note: I removed the '$' in front of the charmap because it doesn't seem to
apply to the example you were trying to create.
Does the above explain why you see an exit code of zero from the last command
in the pipe sequence?
In Bash you can use PIPESTATUS to review the exit status of processes in the
last executed foreground pipeline.
You are receiving this mail because:
You are on the CC list for the bug.