asctime_r

char *asctime_r (

const struct tm*tm,

char *buf);

Convert the 'broken-down' time in the structure pointed to by tm into a string, which is stored in the buffer pointed to by buf. The buffer pointed to by buf must

contain at least 26 bytes. The function returns a pointer to the buffer on success, or NULL on failure.

References: 6.5.4 Headers: <time.h>

ctime_r

char *ctime_r (

const time_t *clock, char *buf);

Convert the calendar time pointed to by clock into a string representing the local time, which is stored in the buffer pointed to by buf. The buffer pointed to by buf must contain at least 26 bytes. The function returns a pointer to the buffer on success, or NULL on failure.

References: 6.5.4 Headers: <time.h>

gmtime_r

struct tm *gmtime_r (

const time_t *clock, struct tm *result);

Convert the calendar time pointed to by clock into a 'broken-down time' expressed as Coordinated Universal Time (UTC), which is stored in the structure pointed to by result. The function returns a pointer to the structure on success, or NULL on failure.

References: 6.5.4 Headers: <time.h>

localtime_r

struct tm *localtime_r (

const time_t *clock, struct tm *result);

Convert the calendar time pointed to by clock into a 'broken-down time' expressed as local time, which is stored in the structure pointed to by result. The function returns a pointer to the structure on success, or NULL on failure.

References: 6.5.4 Headers: <time.h>

rand_r

int rand_r (

unsigned int *seed);

Return the next value in a sequence of pseudorandom integers in the range of 0 to RAND_MAX. Whereas rand uses a static variable to maintain the context between a series of calls, rand_r uses the value pointed to by seed, which is supplied by the caller.

References: 6.5.5 Headers: <stdlib.h>

getgrgid_r

int getgrgid_r (

gid_t gid,

struct group *group,

char *buffer,

size_t bufsize,

struct group **result);

Locate an entry from the group database with a group id matching the gid argument. The group entry is stored in the memory pointed to by buffer, which contains bufsize bytes, and a pointer to the entry is stored at the address pointed to by result. The maximum buffer size required can be determined by calling sysconf with the _SC_GETGR_R_SIZE_MAX parameter.

References: 6.5.6

Headers: <sys/types.h>,<grp.h>

Errors: [ERANGE] the specified buffer is too small.

| getgrnam

r

int getgrnam_r (

const char *name,

struct group *group,

char *buffer,

size_t bufsize,

struct group **result);

Locate an entry from the group database with a group name matching the name argument. The group entry is stored in the memory pointed to by buffer, which contains bufsize bytes, and a pointer to the entry is stored at the address pointed to by result. The maximum buffer size required can be determined by calling sysconf with the _SC_GETGR_R_SIZE_MAX parameter.

References: 6.5.6 Headers: <sys/types.h>, <grp.h>

Errors: [ERANGE] the specified buffer is too small.

getpwuid_r

int getpwuid_r (

uid_t uid,

struct passwd *pwd,

char *buffer,

size_t bufsize,

struct passwd **result);

Locate an entry from the user database with a user id matching the uid argument. The user entry is stored in the memory pointed to by buffer, which contains bufsize bytes, and a pointer to the entry is stored at the address pointed to by result. The maximum buffer size required can be determined by calling sysconf with the _SC_GETPW_R_SIZE_MAX parameter.

References: 6.5.6

Headers: <sys/types.h>, <pwd.h>

Errors: [ERANGE ] the specified buffer is too small.

getpwnam_r

int getpwnam_r (

const char *name,

struct passwd *pwd,

char *buffer,

size_t bufsize,

struct passwd **result);

Locate an entry from the user database with a user name matching the name argument. The user entry is stored in the memory pointed to by buffer, which contains bufsize bytes, and a pointer to the entry is stored at the address pointed to by result. The maximum buffer size required can be determined by calling sysconf with the _SC_GETPW_R_SIZE_MAX parameter.

References: 6.5.6

Headers: <sys/types.h>, <pwd.h>

Errors: [ERANGE] the specified buffer is too small.

9.3.12 Signals

Pthreads provides functions that extend the POSIX signal model to support multithreaded processes. All threads in a process share the same signal actions. Each thread has its own pending and blocked signal masks. The

Добавить отзыв
ВСЕ ОТЗЫВЫ О КНИГЕ В ИЗБРАННОЕ

0

Вы можете отметить интересные вам фрагменты текста, которые будут доступны по уникальной ссылке в адресной строке браузера.

Отметить Добавить цитату