Last active
August 30, 2015 15:35
-
-
Save skreuzer/157427 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <sys/param.h> | |
#include <sys/sysctl.h> | |
int | |
main (int argc, char **argv) | |
{ | |
int mp, mib[2] = { CTL_KERN, KERN_MAXPROC }; | |
size_t len = sizeof(mp); | |
sysctl(mib, 2, &mp, &len, NULL, 0); | |
printf("%d\n", mp); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment