Re: mktemp POSIX (and Linux) divergence

2024-01-16 Thread Lloyd Parkes
Kia ora, In one out of one samples I checked, the result of mktemp was only checked for != NULL rather than a more robust check. That same sample (xsrc/external/mit/smproxy/dist/save.c) also preferred to use mkstemp. mktemp() got removed from POSIX because using it is just wrong. Given how much

mktemp POSIX (and Linux) divergence

2024-01-16 Thread Thomas Klausner
Hi! Our mktemp man page says: RETURN VALUES The mktemp() and mkdtemp() functions return a pointer to the template on success and NULL on failure. But POSIX[1] (and Linux) say: The mktemp() function shall return the pointer template. If a unique name cannot be created, template