Instead of gracefully returning an error code to the parent application, I print the error to the screen and bail out of the code.
我没有按通常作法将错误代码返回给父代应用程序,而是将错误打印到屏幕,然后退出程序。
If a parent process should die before the child process, the child process can become a defunct process-also known as a zombie process which usually results in a hung process or hung application.
如果父进程先于子进程死亡,那么子进程就成了死进程(也称为僵尸进程),这常常会导致进程或应用程序挂起。
The example in Listing 7 demonstrates how a parent at any level in the application can control the state of its child component.
清单 7 中的示例演示了一个任意级别的父程序如何控制其子组件的状态。
应用推荐