Nios II Classic Software Developer’s Handbook

ID 683282
Date 5/14/2015
Public
Document Table of Contents

14.1.68. wait()

Prototype

int wait(int *status)

Commonly Called By

newlib C library

Thread-safe

Yes.

Available from ISR

Yes.

Include

<sys/wait.h>

Description

newlib uses the wait() function to wait for all child processes to exit. Because the HAL does not support spawning child processes, this function returns immediately.

Return

On return, the content of status is set to zero, which indicates there is no child processes.

The return value is always –1 and errno is set to ECHILD, which indicates that there are no child processes to wait for.