summaryrefslogtreecommitdiffstats
path: root/contrib/go/_std_1.26/src/runtime/runtime_noclearenv.go
blob: 67e60cc905037737e24da160bfd3c1a119dbc537 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Copyright 2025 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build !linux

package runtime

import _ "unsafe" // for go:linkname

//go:linkname syscall_runtimeClearenv syscall.runtimeClearenv
func syscall_runtimeClearenv(env map[string]int) {
	// The system doesn't have clearenv(3) so emulate it by unsetting all of
	// the variables manually.
	for k := range env {
		syscall_runtimeUnsetenv(k)
	}
}