Skip to content

Commit 67d4c61

Browse files
committed
test: remove os.Getpid in seed generation on baremetal devices
1 parent a83ff30 commit 67d4c61

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/os/tempfile.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ var minrandMutex sync.Mutex
1717
func init() {
1818
// Avoid getting same results on every run
1919
now := time.Now()
20-
seed := uint32(Getpid()) ^ uint32(now.Nanosecond()) ^ uint32(now.Unix())
20+
// seed := uint32(Getpid()) ^ uint32(now.Nanosecond()) ^ uint32(now.Unix())
21+
seed := uint32(now.Nanosecond()) ^ uint32(now.Unix())
2122
// initial state must be odd
2223
minrandPreviousValue = seed | 1
2324
}

0 commit comments

Comments
 (0)