4 ms·
> You pretty much need to do everything from a separate process, which is the main issue. I’m confused. fork()/spawn() are the proper means to launch child pro
by otterley 7y ago
> You pretty much need to do everything from a separate process, which is the main issue.
I’m confused. fork()/spawn() are the proper means to launch child processes on Linux. What language would do things differently if the syscall determines the means here?
- cpuguy83 7y agoBecause go is always multithreaded. You literally cannot do certain system level things in Go. For instance trying to "setns" to a mount namespace will yield EINVAL from the kernel in all cases with Go. In fact, all namespace related operations are really annoying to do from Go because the runtime is always multithreaded and you have no control over the threading except for locking the active goroutine to its currently assigned thread. This also makes that thread unusable for any new goroutine (even goroutines that are spawned from code running in that thread), which has the side-effect that the new goroutine will always be in the original namespace context.