MCPcopy Create free account
hub / github.com/ElementsProject/lightning / tmpdir_mkstemp

Function tmpdir_mkstemp

common/utils.c:222–234  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

220}
221
222int tmpdir_mkstemp(const tal_t *ctx, const char *template TAKES, char **created)
223{
224 char *tmpdir = getenv("TMPDIR");
225 char *path = path_join(ctx, tmpdir ?: "/tmp", template);
226 int fd = mkstemp(path);
227
228 if (fd >= 0)
229 *created = path;
230 else
231 tal_free(path);
232
233 return fd;
234}

Callers 9

create_test_dbFunction · 0.85
create_test_walletFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
tmp_dsnFunction · 0.85
tmp_dsnFunction · 0.85
mainFunction · 0.85

Calls 2

path_joinFunction · 0.85
tal_freeFunction · 0.85

Tested by 9

create_test_dbFunction · 0.68
create_test_walletFunction · 0.68
mainFunction · 0.68
mainFunction · 0.68
mainFunction · 0.68
mainFunction · 0.68
tmp_dsnFunction · 0.68
tmp_dsnFunction · 0.68
mainFunction · 0.68