Source file src/cmd/internal/sys/args.go
1 // Copyright 2021 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 package sys 6 7 // ExecArgLengthLimit is the number of bytes we can safely 8 // pass as arguments to an exec.Command. 9 // 10 // Windows has a limit of 32 KB. To be conservative and not worry about whether 11 // that includes spaces or not, just use 30 KB. Darwin's limit is less clear. 12 // The OS claims 256KB, but we've seen failures with arglen as small as 50KB. 13 const ExecArgLengthLimit = (30 << 10) 14