daemonize icon indicating copy to clipboard operation
daemonize copied to clipboard

documentation should mention issues of fork and multi-threading

Open MartinNowak opened this issue 10 years ago • 5 comments

http://forum.dlang.org/post/[email protected] http://www.linuxprogrammingblog.com/threads-and-fork-think-twice-before-using-them

MartinNowak avatar Feb 24 '15 16:02 MartinNowak

Hmm, that a complex problem. Could it be avoided by using an exec function after forking?

NCrashed avatar Feb 24 '15 17:02 NCrashed

Yes, I'd think so. If you can restart the daemonized process using exec, then it should avoid the problem.

MartinNowak avatar Feb 26 '15 01:02 MartinNowak

GC deadlock issue on the forums was resolved here: https://github.com/etcimon/libasync/pull/22

etcimon avatar Mar 20 '15 02:03 etcimon

It should still be mentioned in the readme and/or the wiki.

MartinNowak avatar Apr 09 '15 09:04 MartinNowak

The information here are a little bit confusing for me:

  • Is this still an issue on linux?
  • Does the issue occur only when I do multi threading in general or only when using libasync?

MartinNowak mentioned the issue simply can be solved by using an exec function after forking. I am not an expert here, but if this is just a few lines, could you add these line if you have some time?

andre2007 avatar Feb 11 '19 12:02 andre2007