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

> share or copy code, data, stack, and I think file opens

Sounds like linux's "clone" system call. Which is the underlying syscall which clib's fork() uses.

You can do just about anything imaginable with it: http://linux.die.net/man/2/clone

For example: you could create a child process-like-thing which shares nothing but the signal handler table. No idea what that would be good for.



Not all combinations are allowed. In this specific case, if you specify CLONE_SIGHAND then you must also specify CLONE_VM (so the processes share a virtual memory space, and are essentially threads).


Ah good catch, sorry I just skimmed the man page for an interesting sounding feature.


For that reason, clone(2) always felt like an overgenerality -- an attempt to decompose something into orthogonal parts, most combinations of which actually don't make sense.




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

Search: