Nios® II Software Developer Handbook

ID 683525
Date 8/28/2023
Public
Document Table of Contents

15.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.