Fixing application process infinite loop.

Main process exiting before app process init may have caused hanging.
This commit is contained in:
Max Romanov
2020-03-30 14:18:51 +03:00
parent ab7b42a072
commit 0935630cba
4 changed files with 33 additions and 23 deletions

View File

@@ -138,6 +138,8 @@ func nxt_go_port_send(pid C.int, id C.int, buf unsafe.Pointer, buf_size C.int,
if err != nil {
nxt_go_warn("write result %d (%d), %s", n, oobn, err)
n = -1
}
return C.ssize_t(n)
@@ -164,6 +166,8 @@ func nxt_go_port_recv(pid C.int, id C.int, buf unsafe.Pointer, buf_size C.int,
if err != nil {
nxt_go_warn("read result %d (%d), %s", n, oobn, err)
n = -1
}
return C.ssize_t(n)