File: config.kvmopen.c

package info (click to toggle)
gnustep-base 1.26.0-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 27,260 kB
  • sloc: objc: 204,878; ansic: 32,160; sh: 157; makefile: 128; cpp: 122; xml: 32
file content (16 lines) | stat: -rw-r--r-- 326 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/*
 * Check to see if we can open the kernel memory. 
 */
#include <stdio.h>
#include <kvm.h>
#include <fcntl.h>
#include <sys/param.h>
#include <sys/sysctl.h>
int main()
{
  kvm_t *kptr = NULL;

  /* open the kernel */
  kptr = kvm_open(NULL, "/dev/null", NULL, O_RDONLY, "NSProcessInfo");
  return (kptr != NULL) ? 0 : 1;
}