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

An interesting question. I don't know of the design decisions or whether the fork idea predated UNIX. But to me, it's just the sheer simplicity. Compare to the basic process creation function on Windows, taking 10 arguments: http://msdn.microsoft.com/en-us/library/ms682425(VS.85).aspx

Another useful application of the implicit descriptor sharing is http://en.wikipedia.org/wiki/Privilege_separation



Except fork() doesn't do what CreateProcess() does. I'd actually be pretty interested to see a fair comparison: a list of Unix system calls, with arguments, that covers all the functionality of CreateProcess(). Are you completely sure that it'll be smaller and more elegant?


Well, it is certainly the UNIX way. Have many simple tools that do simple stuff, plus the ability to combine them for doing complex operations, rather than few complex tools that do complex operations directly.

I'd say it is more elegant design, whether or not it results in smaller or more elegant code.


If you reimplement Windows in Unix, it's unlikely to be more elegant. The question is if that would be a good idea.




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

Search: