|GETPROGNAME(3)||Library Functions Manual||GETPROGNAME(3)|
setprogname — get/set the
name of the current program
const char *
These utility functions get and set the current program's name as used by various error-reporting functions.
returns the name of the current program. This function is typically useful
when generating error messages or other diagnostic output.
function sets the name of the program to be the last path component of the
name argument. Internally, only the pointer to the
given string is kept as the program name, so it should not be modified and
the storage for the string must remain valid for the rest of the program's
setprogname() functions first appeared in
OpenBSD 5.4 as function-based wrappers around the
The string returned by
supplied by the invoking process and should not be trusted by setuid or
|May 5, 2015||OpenBSD-current|