From 77873b32d748479f6aa95ac5cd7b47eed3de8121 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Tue, 13 Oct 2015 19:10:18 +0200 Subject: info: customary prefixes for perror MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- doc/info/chap/error-reporting.texinfo | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'doc/info') diff --git a/doc/info/chap/error-reporting.texinfo b/doc/info/chap/error-reporting.texinfo index 7769015..6496019 100644 --- a/doc/info/chap/error-reporting.texinfo +++ b/doc/info/chap/error-reporting.texinfo @@ -122,6 +122,17 @@ the value on @code{errno}, its value must be saved if there are function calls between the failure and the call to @code{perror}. +@lvindex program_invocation_name +@lvindex program_invocation_short_name +It is customary to set @code{prefix} to +a value equivalent to @code{program_invocation_name}, +or alternatively @code{program_invocation_short_name}. +Sometiems, the name of the called function is +used, this is to simplify debugging. But the +standard is that programs shall print there +them when reporting an error so that the user +knows that program failed. + TODO: Not implemented. @item char* strerror(int errnum) -- cgit v1.2.3-70-g09d2