#include <stdlib.h> const char *getprogname(void);
void setprogname(const char *progname);
The getprogname() function returns the name of the program. If the name has not yet been set, it returns NULL.
The setprogname() function sets the name of the program to be the last component of the progname argument. Since a pointer to the given string is kept as the program name, it should not be modified for the duration of the program.
These functions are used by error-reporting routines to produce consistent output.
See attributes(5) for descriptions of the following attributes: