On 13 Jan 2014, at 02:01, Michael J. Forster <mike@sharedlogic.ca> wrote:
On 14-01-12 09:13 AM, Esteban Lorenzano wrote:
but there is something wrong because I have the same version and it works⦠grrrrâ¦. I hate incompatibility version problems :(
[...]
Hi Esteban,
The problem is that the call to "mktemp ... 'image.XXXXX'" is incorrect. mktemp(3) requires six Xs in the directory name template, but only five Xs are used by the zeroconf script. That it works on some platforms is misleading--those platforms aren't implementing mktemp(3) exactly. To make it work on all platforms, the mktemp(3) call must be as specified in the man page.
On my machine, there is no mention of a minimal number: MKTEMP(1) BSD General Commands Manual MKTEMP(1) NAME mktemp -- make temporary file name (unique) SYNOPSIS mktemp [-d] [-q] [-t prefix] [-u] template ... mktemp [-d] [-q] [-u] -t prefix DESCRIPTION The mktemp utility takes each of the given file name templates and overwrites a portion of it to create a file name. This file name is unique and suitable for use by the application. The template may be any file name with some number of `Xs' appended to it, for example /tmp/temp.XXXX. The trailing `Xs' are replaced with the current process number and/or a unique letter combination. The number of unique file names mktemp can return depends on the number of `Xs' provided; six `Xs' will result in mktemp selecting 1 of 56800235584 (62 ** 6) possible file names. It might be needed for portability, but who says "those platforms aren't implementing mktemp(3) exactly", against which spec ?
Best regards,
Mike
-- Michael J. Forster, B.Sc. (Hons.), B.Sc. COO, Programmer Shared Logic Inc.