diff options
author | Vincent Sanders <vince@kyllikki.org> | 2019-09-21 13:12:31 +0100 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2019-09-21 13:12:31 +0100 |
commit | 737a09d53e57b6ca7bba82e4e579056127fec17f (patch) | |
tree | 7d3255baf22dd71dfea0bda122edb4f4526daa7c /test | |
parent | d5490be98aa754906fb55dce445f1eb581a29edc (diff) | |
download | netsurf-737a09d53e57b6ca7bba82e4e579056127fec17f.tar.gz netsurf-737a09d53e57b6ca7bba82e4e579056127fec17f.tar.bz2 |
make the temporary file names unique so other tests do not overwrite them
Diffstat (limited to 'test')
-rw-r--r-- | test/nsoption.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/nsoption.c b/test/nsoption.c index 8f2388a5b..fe986790f 100644 --- a/test/nsoption.c +++ b/test/nsoption.c @@ -49,7 +49,9 @@ static char *testnam(char *out) { static int count = 0; static char name[64]; - snprintf(name, 64, "/tmp/nsoptiontest%d", count); + int pid; + pid=getpid(); + snprintf(name, 64, "/tmp/nsoptiontest%d%d", pid, count); count++; return name; } |