I am working with the linux kernel. In my userspace (Simple C program file) I need to make an array that is equal in size to the number of processes running. Inside of my C program main function, how do I know the number of processes running?
I know that in kernel space, I would use the macro "for_each_process(task)" but this is strictly a kernel space macro. I need something similar for userspace. Advice?