Plan 9 from Bell Labs’s /usr/web/sources/patch/applied/libmach-map-open/readme
attachproc curiously uses a constant variable set to ORDWR, a remnant of some earlier code. instead of always forcing ORDWR for register access, why not try it, and if it can't be opened read-write, use read-only instead.