unix - Linux, where are the return codes stored of system daemons and other processes? -


how know, if process has completed execution without errors? how know, if c++ program has returned success os?

if run via shell, use $?, if checking status of process, initiated other user, how check status?

say started process in morning, , got terminated @ noon. have been workign on other activities till evening, , prior leaving, check processes has returned os. how acheve that, programatically. running through syslog help, looking alternatives.

i run through os's process table , read information, sounds bit complicated requirement. have syslog, errors of processes recorded?

any other ways retrieve errors reported terminated processes (of other users too)?

when process terminates parent process must acknowledge using wait or waitpid function. these functions return exit status. after call wait or waitpid process table entry removed, , exit status no longer stored anywhere in operating system. should check if software use start process saves exit status somewhere.

if parent process has not acknowledged child has terminated can read exit status /proc file system: last field in /proc/[pid]/stat. stored in same format wait returns it, have divide 256 exit code. have root.


Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -