reberhardt7 / cplayground

GNU General Public License v3.0
118 stars 14 forks source link

Add zombie process indicators #38

Closed glen3b closed 3 years ago

glen3b commented 4 years ago

Fixes #17; addresses #15.

Modifies the code to pass through the one-letter run state indicator (Z, R, S, D, etc; the one output by ps and friends) from the kernel module all the way to the frontend, and to mark the process status as "zombie" there. By taking this from our kernel module directly we avoid the additional data synchronization problem that would be introduced by calling ps (as is mentioned in that ticket), and stick to only two sources, kernel module and gdb.

I'm not entirely happy with how that's modeled in code, I feel like converting between the letter and the state might be able to be done more cleanly (maybe a dictionary in the constants file?), but this should get the job done. Further improvement on that model might be appropriate for #15.

I'm very open to review and improvements on all of this; my web app skills are rusty, and it's always good to have more eyes on kernelspace code.

I should also mention that this has not been vetted extremely thoroughly, although I have attempted to test the important simple cases.

reberhardt7 commented 3 years ago

Sorry for taking soo long to get around to this... but it looks great! Thanks so much for tackling this.