Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More features from Plan 9 and Linux #5

Open
alexchandel opened this issue Apr 22, 2016 · 0 comments
Open

More features from Plan 9 and Linux #5

alexchandel opened this issue Apr 22, 2016 · 0 comments

Comments

@alexchandel
Copy link
Owner

As of 48023bb, where PID, CPUID, and DISPID are numbers, PNAME is the process name, and WID is the window id, the current layout is something like this:

/proc/PID
/proc/PID/carbon/
/proc/PID/carbon/name
/proc/PID/carbon/psn
/proc/PID/cmdline
/proc/PID/jobc
/proc/PID/paddr
/proc/PID/pcred/
/proc/PID/pcred/rgid
/proc/PID/pcred/ruid
/proc/PID/pcred/svgid
/proc/PID/pcred/svgid
/proc/PID/pgid
/proc/PID/ppid
/proc/PID/task/  # lots of subfiles
/proc/PID/tdev
/proc/PID/tpgid
/proc/PID/ucred/
/proc/PID/ucred/groups
/proc/PID/ucred/uid
/proc/PID/wchan
/proc/PID/windows/
/proc/PID/windows/all
/proc/PID/windows/identify
/proc/PID/windows/onscreen
/proc/PID/windows/screenshots/
/proc/PID/windows/screenshots/WID.png
/proc/byname/
/proc/byname/PNAME
/proc/system/
/proc/system/firmware/
/proc/system/firmware/variables
/proc/system/hardware/
/proc/system/hardware/camera/screenshot.tiff
/proc/system/hardware/cpus/CPUID/data
/proc/system/hardware/displays/DISPID/info
/proc/system/hardware/displays/DISPID/screenshot.png
/proc/system/hardware/lightsensor/data
/proc/system/hardware/motionsensor/data
/proc/system/hardware/mouse/data

We have unique things, but we're also missing lots of stuff, like from Linux

/proc/PID/cmdline
/proc/PID/cwd
/proc/PID/environ
/proc/PID/exe
/proc/PID/fd/
/proc/PID/fdinfo/
/proc/PID/maps
/proc/PID/mem
/proc/PID/root
/proc/PID/status

which let you access the process's environment variables and file descriptors.

There's also cooler stuff from Plan 9, like

/proc/trace
/proc/PID/ctl
/proc/PID/note
/proc/PID/noteid
/proc/PID/notepg
/proc/PID/ns
/proc/PID/regs
/proc/PID/segment
/proc/PID/status
/proc/PID/wait

which allow sending control messages to the process (like start, stop, trace), sending notes (i.e. arbitrary string signals that Plan 9 replaced the BSD signals like SIGINT with), tracing any process that has had trace written to its ctl, accessing the register values of a process, and other things.

All of this (except maybe notes, which are even too cool for Linux) should be implementable on OS X.

There's also our /proc/system/, which should have more in common with sysfs and Plan 9's /dev.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant