Nios® V Processor Software Developer Handbook

ID 743810
Date 5/26/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

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