2 ms·
Thanks! Honestly, the ergonomics of Go for this are a double-edged sword. On one hand, using os/exec and syscall packages feels much more 'human-readable' than
by Nya-kundi 10mo ago
Thanks! Honestly, the ergonomics of Go for this are a double-edged sword. On one hand, using os/exec and syscall packages feels much more 'human-readable' than raw C. It definitely makes the kernel primitives feel less like black magic.
The tricky part is the Go runtime—since it's multi-threaded by default, you have to be really careful about runtime.LockOSThread() when manipulating namespaces so you don't 'leak' a namespace change to the wrong thread. If you're looking to learn the basics, I think the Go codebase is way easier to digest than a massive C project!