Don't run code between fork and exec in a multi threaded program, I agree it's sad but it's also a complex problemhttps://twitter.com/weaveworks/status/869693489801555972 …
-
-
Replying to @jessfraz
It's library-unsafe even in single-threaded programs, assuming library code can consider itself to "own" resources.
1 reply 0 retweets 0 likes -
Replying to @RichFelker @jessfraz
After fork, you have two instances of the code which now both think they have exclusive access to the same resource. Broken by design.
1 reply 0 retweets 1 like -
Replying to @RichFelker @jessfraz
POSIX has some fun rules for how this interacts with stdio FILE streams vs file descriptors: http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_05_01 …
1 reply 0 retweets 0 likes
Replying to @RichFelker @jessfraz
This is a perpetual source of "why did printf print the output twice?" type questions on SO (answer: UB).
10:52 AM - 31 May 2017
0 replies
0 retweets
0 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.