github.com/searKing/golang/go@v1.2.117/syscall/setsid_js.go (about)

     1  // Copyright 2022 The searKing Author. 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 exec
     6  
     7  import "syscall"
     8  
     9  // SysProcAttrSetsid run a program in a new session, is used to detach the process from the parent (normally a shell)
    10  //
    11  // The disowning of a child process is accomplished by executing the system call
    12  // setpgrp() or setsid(), (both of which have the same functionality) as soon as
    13  // the child is forked. These calls create a new process session group, make the
    14  // child process the session leader, and set the process group ID to the process
    15  // ID of the child. https://bsdmag.org/unix-kernel-system-calls/
    16  func SysProcAttrSetsid(attr *syscall.SysProcAttr) {
    17  
    18  }