mirror of
https://github.com/apache/nuttx.git
synced 2026-09-12 13:40:14 +00:00
fix wait after vfork return error
vfork use waitpid hang father process, but waitpid release child processs information by default. So when user call wait, it return errno 10. Signed-off-by: yangyalei <yangyalei@xiaomi.com>
This commit is contained in:
parent
eba2f163ed
commit
fd776e8cee
4 changed files with 11 additions and 8 deletions
|
|
@ -63,7 +63,7 @@ pid_t vfork(void)
|
|||
* until running finished or performing exec
|
||||
*/
|
||||
|
||||
ret = waitpid(pid, &status, 0);
|
||||
ret = waitpid(pid, &status, WNOWAIT);
|
||||
if (ret < 0)
|
||||
{
|
||||
serr("ERROR: waitpid failed: %d\n", get_errno());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue