rpctest: Fix typo

Use os.Getpid() to get the process ID, not os.Getppid(), which returns
the parent process ID.  This resulted in multiple calls to
generateListeningAddresses() getting the same listening ports.
This commit is contained in:
David Hill 2016-09-22 00:14:51 -04:00
parent 5ec83d23f3
commit 99165eb558

View file

@ -44,7 +44,7 @@ var (
// It should be noted however that there is still some small probability // It should be noted however that there is still some small probability
// that there will be port collisions either due to other processes // that there will be port collisions either due to other processes
// running or simply due to the stars aligning on the process IDs. // running or simply due to the stars aligning on the process IDs.
processID = os.Getppid() processID = os.Getpid()
// testInstances is a private package-level slice used to keep track of // testInstances is a private package-level slice used to keep track of
// all active test harnesses. This global can be used to perform // all active test harnesses. This global can be used to perform