From cc7c05960ee7f885af6b160b52e830199fcc8987 Mon Sep 17 00:00:00 2001 From: patacongo Date: Sat, 28 Jul 2012 18:38:13 +0000 Subject: [PATCH] Lock the scheduler when starting NSH builtin applications to eliminate race conditions git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4988 42af7a65-404d-4744-a932-0658087f49c3 --- sched/sched_waitpid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sched/sched_waitpid.c b/sched/sched_waitpid.c index 9be6223112..e8e2f61a23 100644 --- a/sched/sched_waitpid.c +++ b/sched/sched_waitpid.c @@ -238,7 +238,7 @@ pid_t waitpid(pid_t pid, int *stat_loc, int options) return pid; errout_with_errno: - errno = err; + set_errno(err); errout: sched_unlock(); return ERROR;