Not sure why this is needed.  Per man:

 If *status* is not NULL, *wait*() and *waitpid*() store status information
       in the *int* to which it points.




On Fri, Jul 24, 2015 at 8:49 AM, Mike Holmes <[email protected]> wrote:

> It is possible that wait will return a valid pid but have failed to have
> set a status. Set a default status so that if this occurs the value will
> be known and not garbage.
>
> Signed-off-by: Mike Holmes <[email protected]>
> ---
>  helper/linux.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/helper/linux.c b/helper/linux.c
> index 4256f43..3d3b6b8 100644
> --- a/helper/linux.c
> +++ b/helper/linux.c
> @@ -198,7 +198,7 @@ int odph_linux_process_wait_n(odph_linux_process_t
> *proc_tbl, int num)
>  {
>         pid_t pid;
>         int i, j;
> -       int status;
> +       int status = 0;
>
>         for (i = 0; i < num; i++) {
>                 pid = wait(&status);
> --
> 2.1.4
>
> _______________________________________________
> lng-odp mailing list
> [email protected]
> https://lists.linaro.org/mailman/listinfo/lng-odp
>
_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to