1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-15 15:53:55 +00:00

Fixed issue caused by Signal Listener being at top of chain, so it could get emitted before a pipe read

This commit is contained in:
Bryan Roe
2020-06-02 03:43:20 -07:00
parent 54628594f1
commit e9764045a4
3 changed files with 54 additions and 24 deletions

View File

@@ -280,6 +280,7 @@ duk_ret_t ILibDuktape_SpawnedProcess_SIGCHLD_sink(duk_context *ctx)
}
else
{
printf("Not DETACHED\n");
// We are not detached, so we need to call the same method that broken pipe would've
ILibDuktape_ChildProcess_SubProcess *childprocess = (ILibDuktape_ChildProcess_SubProcess*)Duktape_GetBufferProperty(ctx, -1, ILibDuktape_ChildProcess_MemBuf);
if (childprocess != NULL)