Commits

nat_linden committed 4007fcc Draft

MAINT-1986: patch OPSDEV-111 fix (rev 9346b73d6843) from server-trunk

Comments (0)

Files changed (1)

indra/llcommon/lluuid.cpp

    static unsigned char seed[16];		/* Flawfinder: ignore */
    
    getNodeID(&seed[0]);
-   seed[6]='\0';
-   seed[7]='\0';
+
+   // Incorporate the pid into the seed to prevent
+   // processes that start on the same host at the same
+   // time from generating the same seed.
+   pid_t pid = LLApp::getPid();
+
+   seed[6]=(unsigned char)(pid >> 8);
+   seed[7]=(unsigned char)(pid);
    getSystemTime((uuid_time_t *)(&seed[8]));
 
    LLMD5 md5_seed;