mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
lws_spawn: get result to temp si
We pass the temp si to the reap callback, we delete the lsp one beforehand. But we were collecting the spawn retcode into the lsp one...
This commit is contained in:
parent
ed837acda0
commit
c6165f8680
1 changed files with 1 additions and 1 deletions
|
@ -188,7 +188,7 @@ lws_spawn_reap(struct lws_spawn_piped *lsp)
|
|||
}
|
||||
|
||||
temp = *lsp;
|
||||
waitid(P_PID, lsp->child_pid, &lsp->si, WEXITED | WNOHANG);
|
||||
waitid(P_PID, lsp->child_pid, &temp.si, WEXITED | WNOHANG);
|
||||
lsp->child_pid = -1;
|
||||
|
||||
/* destroy the lsp itself first (it's freed and plsp set NULL */
|
||||
|
|
Loading…
Add table
Reference in a new issue