*** UNIX MANUAL PAGE BROWSER ***

A Nergahak database for man pages research.

Navigation

Directory Browser

1Browse 4.4BSD4.4BSD
1Browse Digital UNIXDigital UNIX 4.0e
1Browse FreeBSDFreeBSD 14.3
1Browse MINIXMINIX 3.4.0rc6-d5e4fc0
1Browse NetBSDNetBSD 10.1
1Browse OpenBSDOpenBSD 7.7
1Browse UNIX v7Version 7 UNIX
1Browse UNIX v10Version 10 UNIX

Manual Page Search

Manual Page Result

0 Command: getprogname | Section: 3 | Source: OpenBSD | File: getprogname.3
GETPROGNAME(3) FreeBSD Library Functions Manual GETPROGNAME(3) NAME getprogname, setprogname - get or set the name of the current program SYNOPSIS #include <stdlib.h> const char * getprogname(void); void setprogname(const char *name); DESCRIPTION These utility functions get and set the current program's name as used by various error-reporting functions. getprogname() returns the name of the current program. This function is typically useful when generating error messages or other diagnostic output. The setprogname() 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 lifetime. SEE ALSO err(3), setproctitle(3) HISTORY The getprogname() and setprogname() functions first appeared in OpenBSD 5.4 as function-based wrappers around the 4.4BSD __progname interface. CAVEATS The string returned by getprogname() is supplied by the invoking process and should not be trusted by setuid or setgid programs. FreeBSD 14.1-RELEASE-p8 February 22, 2023 FreeBSD 14.1-RELEASE-p8

Navigation Options