News for hackers. Stuff that matters.
Re:Learn and use fork(), vfork(), wait() and exec() system c... by dullgiulio on Wednesday October 30, 2019 @03:18PM (#21401451)
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.

Re:Learn and use fork(), vfork(), wait() and exec() system c... by matheusmoreira on Wednesday October 30, 2019 @03:55PM (#21401834)
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.

Re:Learn and use fork(), vfork(), wait() and exec() system c... by dooglius on Thursday October 31, 2019 @11:30AM (#21409850)
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.