I'm looking how I can get exit code from non-child process.
As we all know there are few functions to work with child processes such as wait/waitpid. With this function we can wait until child process will be closed and get exit error code. But this works only with child processes.
Actually I'm looking for Windows analogue of GetExitCodeProcess. In Windows we can open process by calling OpenProcess
and then work directly with returned handle. So we can call GetExitCodeProcess
function and retrieve status.
Is there something same in Linux for working with non-child processes?