feat: import Sea vHost single-server testing release

This commit is contained in:
canglan committed 2026-10-30 08:39:10 +08:00
commit 248badd33e
441 files changed
+63221

No files matched your search

@@ -0,0 +1,20 @@
//go:build !linux
package isolation
import (
"errors"
"os"
"path/filepath"
)
func acquirePythonInstallLock(buildRoot, version string) (func(), error) {
lockPath := filepath.Join(buildRoot, ".install-"+version+".lock")
if err := os.Mkdir(lockPath, 0700); err != nil {
if errors.Is(err, os.ErrExist) {
return nil, errors.New("Python version installation is already running")
}
return nil, err
}
return func() { _ = os.Remove(lockPath) }, nil
}