The OpenNET Project / Index page

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

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

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

setenv (3)
  • setenv (1) ( Solaris man: Команды и прикладные программы пользовательского уровня )
  • setenv (1) ( FreeBSD man: Команды и прикладные программы пользовательского уровня )
  • >> setenv (3) ( Solaris man: Библиотечные вызовы )
  • setenv (3) ( FreeBSD man: Библиотечные вызовы )
  • setenv (3) ( Русские man: Библиотечные вызовы )
  • setenv (3) ( Linux man: Библиотечные вызовы )
  • setenv (3) ( POSIX man: Библиотечные вызовы )
  •  

    NAME

    setenv - add or change environment variable
     
    

    SYNOPSIS

    #include <stdlib.h>
    
    int setenv(const char *envname, const char *envval,
        int overwrite);
    

     

    DESCRIPTION

    The setenv() function updates or adds a variable in the environment of the calling process. The envname argument points to a string containing the name of an environment variable to be added or altered. The environment variable is set to the value to which envval points. The function fails if envname points to a string which contains an '=' character. If the environment variable named by envname already exists and the value of overwrite is non-zero, the function returns successfully and the environment is updated. If the environment variable named by envname already exists and the value of overwrite is zero, the function returns successfully and the environment remains unchanged.

    If the application modifies environ or the pointers to which it points, the behavior of setenv() is undefined. The setenv() function updates the list of pointers to which environ points.

    The strings described by envname and envval are copied by this function.  

    RETURN VALUES

    Upon successful completion, 0 is returned. Otherwise, -1 is returned, errno set to indicate the error, and the environment is left unchanged.  

    ERRORS

    The setenv() function will fail if:

    EINVAL

    The envname argument is a null pointer, points to an empty string, or points to a string containing an '=' character.

    ENOMEM

    Insufficient memory was available to add a variable or its value to the environment.

     

    ATTRIBUTES

    See attributes(5) for descriptions of the following attributes:

    ATTRIBUTE TYPEATTRIBUTE VALUE

    Interface StabilityStandard

    MT-Level

     

    SEE ALSO

    getenv(3C), unsetenv(3C), attributes(5), standards(5)


     

    Index

    NAME
    SYNOPSIS
    DESCRIPTION
    RETURN VALUES
    ERRORS
    ATTRIBUTES
    SEE ALSO


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




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

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