---
name: "getconfent"
section: "3"
platform: "linux"
package: "liblcgdm-dev"
version: "1.10.0-2+b3"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/getconfent"
---

# getconfent(3)

Get configuration entry

## NAME

getconfent, getconfent\_r - Get configuration entry

## SYNOPSIS

```

```

**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***);**

## DESCRIPTION

**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.

## SEE ALSO

**shift.conf(4),** **Cthread\_create(3)**

## AUTHOR

**LCG Grid Deployment** Team
