IPB
>  Man Pages > Unix > FreeBSD 6.2 > Section 3 > getprogname man page

getprogname man page

Section 3 - FreeBSD 6.2 Man Pages

Other operating system man pages available here


Advanced Search

Hopefully, this page is exactly what you are looking for, but if not, you can always find further assistance on Unix/Linux Forum!


GETPROGNAME(3)         FreeBSD Library Functions Manual         GETPROGNAME(3)


NAME

     getprogname, setprogname -- get or set the program name


LIBRARY

     Standard C Library (libc, -lc)


SYNOPSIS

     #include <stdlib.h>

     const char *
     getprogname(void);

     void
     setprogname(const char *progname);


DESCRIPTION

     The getprogname() and setprogname() functions manipulate the name of the
     current program.  They are used by error-reporting routines to produce
     consistent output.

     The getprogname() function returns the name of the program.  If the name
     has not been set yet, it will return 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 rest of
     the program's lifetime.

     In FreeBSD, the name of the program is set by the start-up code that is
     run before main(); thus, running setprogname() is not necessary.  Pro-
     grams that desire maximum portability should still call it; on another
     operating system, these functions may be implemented in a portability
     library.  Calling setprogname() allows the aforementioned library to
     learn the program name without modifications to the start-up code.


SEE ALSO

     err(3), setproctitle(3)


HISTORY

     These functions first appeared in NetBSD 1.6, and made their way into
     FreeBSD 4.4.

FreeBSD 6.2                       May 1, 2001                      FreeBSD 6.2


Man(1) output converted with man2html and wrapped by fishsponge

This page was generated on Wed Sep 19 20:09:22 BST 2007

Your favourite pages:

No pages logged yet.
Trying to save cookie...

Top 10 most popular pages:

sqlite3 man page (5327 hits)
(openSUSE 10.2)

svn man page (5200 hits)
(FreeBSD 6.2)

adv_cap_autoneg man page (4869 hits)
(Solaris 10 11_06)

CPAN man page (4604 hits)
(Suse Linux 10.1)

ssh man page (4341 hits)
(Suse Linux 10.1)

ssh-socks5-proxy-connect man page (2863 hits)
(Solaris 10 11_06)

netcat man page (2705 hits)
(Suse Linux 10.1)

pprosetup man page (2480 hits)
(Solaris 10 11_06)

startproc man page (2469 hits)
(Suse Linux 10.1)

signal man page (2400 hits)
(Suse Linux 10.1)

Useful Links

Go Back

Visitor Statistics


Valid XHTML 1.0 Transitional     Valid CSS!

Partners: Cambridge Plus :: Pyrenees Ski Holidays :: Electronic Circuit Design :: <Link Available>
Unix Man Pages / Linux Man Pages :: HiFi Forum :: SIP VoIP Phone & Provider Reviews :: UNIX/Linux Forum Archives

More info on advertising on Unix/Linux Forum