[kqueue] fix of Critical (pid: 21920; thread: 0x802806400): tdup(): tdup() is not thread-safe function (current errno 0: No error: 0)