How do i know, if a process has completed its execution without any errors?
How do i know, if a C++ program has returned success to OS?
If i run it via shell, then i could use $?, however if i am checking the status of a process, initiated by other user, how could i check the status?
Say i started a process in morning, and it got terminated at noon. i have been workign on some other activities till evening, and prior leaving, i would like to check what the processes has returned to OS. how could i acheve that, programatically. Running through syslog would help, but looking for alternatives.
i could run through the OS's process table and read this information, however it sounds a bit complicated for my requirement. Do we have something like syslog, where all errors of processes are recorded?
Any other ways to retrieve errors reported by terminated processes (of other users too)?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…