...

Source file src/cmd/vendor/golang.org/x/telemetry/start_posix.go

Documentation: cmd/vendor/golang.org/x/telemetry

     1  // Copyright 2024 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  //go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
     6  
     7  package telemetry
     8  
     9  import (
    10  	"os/exec"
    11  	"syscall"
    12  )
    13  
    14  func init() {
    15  	daemonize = daemonizePosix
    16  }
    17  
    18  func daemonizePosix(cmd *exec.Cmd) {
    19  	cmd.SysProcAttr = &syscall.SysProcAttr{
    20  		Setsid: true,
    21  	}
    22  }
    23  

View as plain text