Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

All these systemcalls (except wait(2)) are just facade for clone(2), which has a whole bunch of options.

Basically everything from threads to program invocation is just this one powerful systemcall.



Clone is a great system call, it allows the programmer to specify which resources are shared with the new task. The problem with clone is the C standard library maintains global and thread-local state. For example, using clone is not supported by glibc:

> If you use clone() you're on your own.

https://sourceware.org/bugzilla/show_bug.cgi?id=10311

Sometimes it feels like the standard library is holding C back. I wonder how many great Linux-specific features go unused because of it.


This looks like more of a case of glibc not working well with one particular combination of options. I don't think libc really holds anyone back considering it does still expose a syscall wrapper.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: