GETPROGNAME(3) BSD Library Functions Manual GETPROGNAME(3)NAME
getprogname, setprogname -- get or set the program name
LIBRARY
Utility functions from BSD systems (libbsd, -lbsd)
SYNOPSIS
#include <bsd/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 pro-
duce 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.
Programs that desire maximum portability should still call it; on another operating system, these functions may be implemented in a portabil-
ity 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.
BSD May 1, 2001 BSD
Check Out this Related Man Page
GETPROGNAME(3) BSD 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 pro-
duce 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.
Programs that desire maximum portability should still call it; on another operating system, these functions may be implemented in a portabil-
ity library. Calling setprogname() allows the aforementioned library to learn the program name without modifications to the start-up code.
SEE ALSO err(3)HISTORY
These functions first appeared in NetBSD 1.6, and made their way into FreeBSD 4.4.
BSD May 1, 2001 BSD
My FreeBSD install at ad0s1, and Windows 2000 at ad2s1.
Everytime I start my FreeBSD, it shows me this message:
fdc0: cmd 3 failed at out byte 1 of 3
pmtimer 0 on isa0
fdc0: cannot reserve I/O port range (6 ports)
My Floppy drive info:
0x03F2 - 0x03F3
0x03F4 - 0x03F5
0x03F7 - 0x03F7... (6 Replies)
Hi,
I recently installed FreeBSD 6.0, and am now trying to run my newly created sh scripts, that I ftp'd over from my works Data General - Unix server, I thought they would at least sumwhat/part run, but I can'y even get my basic menu to run and don't know why, can anyone help me by throwing... (6 Replies)
Hi to all,
Iam doing a project in Free BSD and i am stuck with a puzzle. Please any one of you clarify my doubt :
How to add a mechanism to check the status of the file system which alerts the root user via. email if any single partition is greater than 90% full. This alert should include the... (3 Replies)
In this post, hitechredneck said:
I lost the C drive in my venerable Inspiron 8200 :eek: I have installed a temporary replacement C drive and I have a Seagate ST910021A on order for it. If I can get that drive to work with my Inspiron 8200, I am going to install a quad boot... (4 Replies)
Hi,
do you know, is there any thing like Linux From Scratch, but for a BSD operating system?
A tutorial or guide to learn (and build) the system inside out? Would be pretty cool IMO. :D
Blackbird (1 Reply)
hi,
I have pro*c program running on sunsolaris 5.9.Currently the same program has been migrated to solaris 5.10.But the program is not giving the desired output.Do i need to recomplie the source code again.
Regards,
Megh (4 Replies)
Hello All,
I am trying to call a function from the calling main program from a dlopened library function, below is the entire code, when I execute it it crashes with sigill. Can you guys help me out I guess I am missing out on the linker flag or something here. besides I am new to AIX and... (1 Reply)
Is there a universal macro for any BSD system. I am currently on FreeBSD where __FreeBSD__ is defined. It looks like on NetBSD systems __NetBSD__ is defined. I have tried using __BSD__ but doesn't appear to exists. Is there a universal way of testing if you are using any BSD system with GCC?... (6 Replies)