You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
inti, mib[4];
size_tlen;
structkinfo_prockp;
/* Fill out the first three components of the mib */len=4;
sysctlnametomib("kern.proc.pid", mib, &len);
/* Fetch and print entries for pid's < 100 */for (i=0; i<100; i++) {
mib[3] =i;
len=sizeof(kp);
if (sysctl(mib, 4, &kp, &len, NULL, 0) ==-1)
perror("sysctl");
elseif (len>0)
printkproc(&kp);
}
The text was updated successfully, but these errors were encountered:
e.g. from the sysctl manpage:
The text was updated successfully, but these errors were encountered: