The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]

Интерактивная система просмотра системных руководств (man-ов)

 ТемаНаборКатегория 
 
 [Cписок руководств | Печать]

setprogname (3)
  • >> setprogname (3) ( FreeBSD man: Библиотечные вызовы )

  • BSD mandoc
     

    NAME

    
    
    getprogname
    
     
    setprogname
    
     - get or set the program name
    
     
    

    LIBRARY

    Lb libc
    
     
    

    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 Fa 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 Fx , 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 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 Nx 1.6 , and made their way into Fx 4.4 .


     

    Index

    NAME
    LIBRARY
    SYNOPSIS
    DESCRIPTION
    SEE ALSO
    HISTORY


    Поиск по тексту MAN-ов: 




    Партнёры:
    PostgresPro
    Inferno Solutions
    Hosting by Hoster.ru
    Хостинг:

    Закладки на сайте
    Проследить за страницей
    Created 1996-2024 by Maxim Chirkov
    Добавить, Поддержать, Вебмастеру