For some reason, I need to call some system calls on the system (Linux). I checked the syscall package documentation and could not find anything about it.
Then I just saw a project ( https://github.com/AllenDang/w32/blob/master/kernel32.go ) that wraps windows apis. I read its source code a bit.
He uses
modkernel32 = syscall.NewLazyDLL("kernel32.dll")
to load a dynamic library. However, there is no documentation for the NewLazyDLL () function
I am sure there should be a similar function for Linux / UNIX. Is there anyone who can tell me the name of the function or the way to call the Linux system call in the Golang or load functions from libc.so?
More details
I want to call the system call 'daemon' or 'fork' (I want to unmount the process) because I cannot find the golang library.
source share