3 ms·
Do developers just call whatever function seems to work without reading the docs? It doesn't work for low level programming. ~ man fork CAVEATS: There are l
by mkj 9y ago
Do developers just call whatever function seems to work without reading the docs? It doesn't work for low level programming.
~ man fork
CAVEATS: There are limits to what you can do in the child process. To be totally safe you should restrict yourself to only executing async-signal safe operations until such time as one of the exec functions is called. All APIs, including global data symbols, in any framework or library should be assumed to be unsafe after a fork() unless explicitly documented...
- tedunangst 9y agoYes. Programming by coincidence is the norm. Seems to work, must be right.
- Dangeranger 9y agoMy suspicion is that this behavior is left over from early implementations of Ruby where threading wasn’t as common and so wasn’t as large of a concern.
- ProAm 9y agoWelcome to the stackoverflow era of programming, where technical specs don't matter and frameworks are life.
- mrguyorama 9y agoThis has been around since well before stack overflow Here are a plethora of examples from the Windows 95 days: http://ptgmedia.pearsoncmg.com/images/9780321440303/samplechapter/Chen_bonus_ch02.pdf http://ptgmedia.pearsoncmg.com/images/9780321440303/samplech...
- viraptor 9y agoIt's silly to point at this documentation as if this is something that people will read in this case. People, or specifically web developers are not calling fork(). What they're doing is using supported language, a webapp server, using a database access library, and enabling the preloading option. As seen in the bug report in Ruby, this comes down to coordination between those projects. Each one is correct on their own. Putting them together as a web developer shouldn't involve analysing syscalls you're going to make either.