-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Closed
Description
This issue is to discuss how we can implement System.Diagnostics.Process
on FreeBSD which does not have procfs by enabled by default as it should be considered deprecated.
Reference Material
-
Implement basic System.Diagnostics.Process.Modules support on Linux dotnet/corefx#2188
-
The System.Diagnostics.Process specification on MSDN.
-
The FreeBSD process information implementation within Mono (LGPL)
-
The FreeBSD process information implementation within IO.JS (MIT)
-
https://www.freebsd.org/cgi/man.cgi?procstat and https://www.freebsd.org/cgi/man.cgi?sysctl(3)
KERN_PROC Return selected information about specific running processes. For the following names, an array of struct kinfo_proc structures is returned, whose size depends on the current number of such objects in the system. Third level name Fourth level is: KERN_PROC_ALL None KERN_PROC_PID A process ID KERN_PROC_PGRP A process group KERN_PROC_TTY A tty device KERN_PROC_UID A user ID KERN_PROC_RUID A real user ID If the third level name is KERN_PROC_ARGS then the command line argument array is returned in a flattened form, i.e., zero-termi- nated arguments follow each other. The total size of array is returned. It is also possible for a process to set its own process title this way. If the third level name is KERN_PROC_PATHNAME, the path of the process' text file is stored. For KERN_PROC_PATHNAME, a process ID of -1 implies the current process. Third level name Fourth level is: KERN_PROC_ARGS A process ID KERN_PROC_PATHNAME A process ID