in reply to knowing if process dies.
close on a pipe to another process will return a false value if the process did not exit normally. In that case, either $! will be set to some internal error that prevented you from running the process or $? will be set to the exit status of the process. See the documentation for wait() for information on how to extract what exit status to use from $?.
The status you get from a child says:
If the other process was run from the shell, then you get the exit status of the shell. This usually (varies by shell) tries to summarize the exit status of the child by using special exit values to indicate death by signal. But you can easily lose some information in the translation.
- tye (but my friends call me "Tye")
|
|---|