summaryrefslogtreecommitdiff
path: root/test/nsoption.c
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2019-09-21 13:12:31 +0100
committerVincent Sanders <vince@kyllikki.org>2019-09-21 13:12:31 +0100
commit737a09d53e57b6ca7bba82e4e579056127fec17f (patch)
tree7d3255baf22dd71dfea0bda122edb4f4526daa7c /test/nsoption.c
parentd5490be98aa754906fb55dce445f1eb581a29edc (diff)
downloadnetsurf-737a09d53e57b6ca7bba82e4e579056127fec17f.tar.gz
netsurf-737a09d53e57b6ca7bba82e4e579056127fec17f.tar.bz2
make the temporary file names unique so other tests do not overwrite them
Diffstat (limited to 'test/nsoption.c')
-rw-r--r--test/nsoption.c4
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;
}