当前位置: 首页 > 文档资料 > Perl 入门教程 >

wait

优质
小牛编辑
115浏览
2023-12-01

描述 (Description)

此函数等待子进程终止,返回已故进程的进程ID。 该流程的退出状态包含在$?中。

语法 (Syntax)

以下是此函数的简单语法 -

wait

返回值 (Return Value)

如果没有子进程,则此函数返回-1,否则返回已故进程的进程ID

<!--

例子 (Example)

Following is the example code showing its basic usage −

When above code is executed, it produces the following result −

-->