MCPcopy Create free account
hub / github.com/apache/cloudberry / pqGetpwuid

Function pqGetpwuid

src/port/thread.c:64–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62 */
63#ifndef WIN32
64int
65pqGetpwuid(uid_t uid, struct passwd *resultbuf, char *buffer,
66 size_t buflen, struct passwd **result)
67{
68#if defined(ENABLE_THREAD_SAFETY) && defined(HAVE_GETPWUID_R)
69 return getpwuid_r(uid, resultbuf, buffer, buflen, result);
70#else
71 /* no getpwuid_r() available, just use getpwuid() */
72 errno = 0;
73 *result = getpwuid(uid);
74 /* paranoia: ensure we return zero on success */
75 return (*result == NULL) ? errno : 0;
76#endif
77}
78#endif
79
80/*

Callers 4

get_home_pathFunction · 0.85
pg_fe_getauthnameFunction · 0.85
PQconnectPollFunction · 0.85
pqGetHomeDirectoryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected