moonbridge
changeset 299:f9e8fbec2063
Throw error when polling a collected child process
author | jbe |
---|---|
date | Sun Jun 18 01:06:26 2017 +0200 (2017-06-18) |
parents | 09d6428fdf6c |
children | fba670e4beec |
files | moonbridge_io.c |
line diff
1.1 --- a/moonbridge_io.c Sun Jun 18 01:01:45 2017 +0200 1.2 +++ b/moonbridge_io.c Sun Jun 18 01:06:26 2017 +0200 1.3 @@ -1703,6 +1703,7 @@ 1.4 } else { 1.5 child = luaL_testudata(L, -2, MOONBR_IO_CHILD_MT_REGKEY); 1.6 if (child) { 1.7 + if (!child->pid) luaL_error(L, "Attemt to poll an already collected child process"); 1.8 if (!check_sigchld) { 1.9 check_sigchld = 1; 1.10 moonbr_io_sigchld_flag = 0;