getconfent(3)

getconfent3

Get configuration entry

Usage


    

    
        

char * getconfent (
const char *category,
const char *name,
int flags);

char * getconfent_r (
const char *category,
const char *name,
int flags,
char *buffer,
int bufsiz);

Overview

getconfent() get the name entry from the configuration file. Every entry in the configuration file is categorized. The category parameter is its specifier. The getconfent_r() function is a re-entrant version of getconfent() using the passed buffer parameter instead of an internal static buffer.

If threads are created usint the Cthread_create() interface, it is not mandatory to call getconfent_r() in order to assure thread-safe code. In that case getconfent() calls the re-entrant version internally using a buffer allocated in thread local storage.

Return value

getconfent() and getconfent_r() return NULL if the entry is not found. Otherwise, it returns the matched entry. If flags is not null, the return value is a pointer to the full string matched in the configuration file. Otherwise, only the pointer to the first blank separated token is returned.

Errors

If the getconfent(), getconfent_r() function fail, serrno may be set to one of the following values:

SENOCONFIG

configuration file not found.

Releases

Unchanged in 5 releases since Debian 6.0 (Squeeze).

  1. 6.0–10

Author

LCG Grid Deployment Team

From liblcgdm-dev 1.10.0-2+b3 in Debian 10 (Buster). Parsed by carta from the page's man source.