sleep random amount to get rid fo race for multiple instances

SVN revision: 3347
This commit is contained in:
Carsten Haitzler 2000-09-08 00:57:26 +00:00
parent 3bb45d92dc
commit 9700c5cfa5
1 changed files with 2 additions and 0 deletions

View File

@ -5552,6 +5552,8 @@ Epplet_find_instance(char *name)
continue;
}
}
srand(getpid());
usleep((rand() & 0xfffff));
if ((fd = open(s, (O_WRONLY | O_EXCL | O_CREAT), 0600)) < 0)
{
/* Apparently another process just came in under us and created it. Next! */