[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-man
Subject:    AW: error.3: What happens if status = 0
From:       Walter Harms <wharms () bfs ! de>
Date:       2021-02-19 9:09:13
Message-ID: 9c7d3296e4894ec3b118f0f130c51415 () bfs ! de
[Download RAW message or body]

Hi,
yes, error(0,...) is a bit like warn(), it returns to the programm.

That supports what my man page says:

" If  status has a nonzero value, then error() calls exit(3) to terminate
       the program using the given value as the exit status."

may be you want an add on like:

"Otherwise error() returns."

re,
 wh
________________________________________
Von: Alejandro Colomar (man-pages) <alx.manpages@gmail.com>
Gesendet: Donnerstag, 18. Februar 2021 22:55:13
An: Michael Kerrisk (man-pages)
Cc: linux-man@vger.kernel.org; libc-alpha@sourceware.org
Betreff: error.3: What happens if status = 0

Hi Michael,

I think it's not quite clear what happens when status = 0; for
error[_at_line](3) from the text of the manual page.  From the glibc
documentation[1], it seems that error(0, ...) is similar to warn(...),
isn't it?

Thanks,

Alex

[1]:
<https://www.gnu.org/software/libc/manual/html_node/Error-Messages.html#Error-Messages>

--
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic