Sorry for the misleading comments, actually I've removed it in my next patch.
The daemon() is the function provided by unistd.h. It will do a double fork internally, thus it should be called before creating any new thread and as early as possible.
Here is not the best place actually, in my next patch I've moved it to "BasicStartupComplete" in XWalkMainDelegate.