syscall(linux):use clone as go instead fork
This commit is contained in:
@@ -276,6 +276,20 @@ func Getpid() PidT
|
||||
//go:linkname Getppid C.getppid
|
||||
func Getppid() PidT
|
||||
|
||||
// Invoke `system call' number SYSNO, passing it the remaining arguments.
|
||||
// This is completely system-dependent, and not often useful.
|
||||
|
||||
// In Unix, `syscall' sets `errno' for all errors and most calls return -1
|
||||
// for errors; in many systems you cannot pass arguments or get return
|
||||
// values for all system calls (`pipe', `fork', and `getppid' typically
|
||||
// among them).
|
||||
|
||||
// In Mach, all system calls take normal arguments and always return an
|
||||
// error code (zero for success).
|
||||
//
|
||||
//go:linkname Syscall C.syscall
|
||||
func Syscall(sysno c.Long, __llgo_va_list ...any) c.Long
|
||||
|
||||
//go:linkname Kill C.kill
|
||||
func Kill(pid PidT, sig c.Int) c.Int
|
||||
|
||||
|
||||
Reference in New Issue
Block a user