MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / mkstemp

Function mkstemp

test/src/helper.cpp:239–245  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

237}
238
239int mkstemp(char* tpl) {
240 tpl = _mktemp(tpl);
241 mgb_assert(tpl);
242 auto fd = _open(tpl, _O_TEMPORARY | _O_RDWR);
243 mgb_assert(fd > 0, "failed to open %s: %s", tpl, strerror(errno));
244 return fd;
245}
246} // namespace
247#else
248#include <sys/stat.h>

Callers 1

NamedTemporaryFileMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected