public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
From: Carlos O'Donell <carlos@redhat.com>
To: Florian Weimer <fweimer@redhat.com>, Alejandro Colomar <alx@kernel.org>
Cc: linux-man@vger.kernel.org
Subject: Re: [PATCH] man/man1/iconv.1: Mention that -c does not change exit status
Date: Thu, 5 Jun 2025 10:41:59 -0400	[thread overview]
Message-ID: <fc73559f-e6bb-49b6-8ba1-b431b31d542d@redhat.com> (raw)
In-Reply-To: <87msamxso9.fsf@oldenburg.str.redhat.com>

On 6/5/25 8:46 AM, Florian Weimer wrote:
> And that input decoding failures are treated as errors.
> 
> Exiting with status 0 is a POSIX conformance issue that was fixed
> in glibc 2.41.
> 
> Signed-off-by: Florian Weimer <fweimer@redhat.com>

Confirmed 6cbf845fcdc76131d0e674cee454fe738b69c69d is the correct glibc
git commit for this fix.

Confirmed it was fixed in glibc 2.41 along with several other iconv fixes.

Confirmed issue 8 contains the same language for -c and exit status must not change.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>

> ---
>   man/man1/iconv.1 | 7 ++++++-
>   1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/man/man1/iconv.1 b/man/man1/iconv.1
> index 2c8ae0d29..111ff9e89 100644
> --- a/man/man1/iconv.1
> +++ b/man/man1/iconv.1
> @@ -55,6 +55,8 @@ is appended to
>   .IR to-encoding ,
>   characters that cannot be converted are discarded and an error is
>   printed after conversion.
> +(Characters that cannot be decoded are treated as an error with
> +or without this flag.)
>   .IP
>   If the string
>   .B //TRANSLIT
> @@ -73,8 +75,11 @@ transliterated are replaced with a question mark (?) in the output.
>   List all known character set encodings.
>   .TP
>   .B \-c
> -Silently discard characters that cannot be converted instead of
> +Discard characters that cannot be converted instead of
>   terminating when encountering such characters.
> +.\" glibc commit 6cbf845fcdc76131d0e674cee454fe738b69c69d
> +POSIX requires that this option does not change
> +the exit status of the program.
>   .TP
>   .BI \-\-output= outputfile
>   .TQ
> 
> base-commit: 3c2e9ebe2d5ea15a47c1669f75b280cea42a6f8b
> 
> 


-- 
Cheers,
Carlos.


  reply	other threads:[~2025-06-05 14:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-05 12:46 [PATCH] man/man1/iconv.1: Mention that -c does not change exit status Florian Weimer
2025-06-05 14:41 ` Carlos O'Donell [this message]
2025-06-11  8:29   ` Alejandro Colomar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fc73559f-e6bb-49b6-8ba1-b431b31d542d@redhat.com \
    --to=carlos@redhat.com \
    --cc=alx@kernel.org \
    --cc=fweimer@redhat.com \
    --cc=linux-man@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox