|KVM_GETFILES(3)||Library Functions Manual||KVM_GETFILES(3)|
struct kinfo_file *
*kd, int op,
kvm_getfiles() returns a (sub-)set of the open files in the kernel indicated by kd. The op and arg arguments constitute a predicate which limits the set of files returned. The value of op describes the filtering predicate as follows:
Files associated with a process will include information about the process that has the file open.
KERN_FILE_BYFILE the recognized file
types are defined in
Only the first elemsize bytes of each array
entry are returned. If the size of the kinfo_file
structure increases in size in a future release of
OpenBSD, the kernel will only return the requested
amount of data for each array entry and programs that use
kvm_getfiles() will continue to function without the
need for recompilation.
kvm_getfiles() and destroyed by
kvm_close(). Data should be copied out if it needs to be saved.
kvm_getfiles() will return
NULL on failure.
kvm_getfiles() will fail if:
|May 4, 2016||OpenBSD-current|