Writing to /proc/*/ctl
I am having problems trying to write into a /proc/<pid>/ctl file. I start process A and process B. I try to write into process B's ctl file from process A. I get "Permission denied" error. When I look at file permissions, the file has write-only permissions and it is owned by me. I open the file with the flag O_WRONLY. Why do I get permissions error?
# 1
It is more likely that you get answer to this on OpenSolaris forums, for example, this one:
http://www.opensolaris.org/jive/forum.jspa?forumID=31
A wild guess: can it be that the control file you're trying to open is already opened by another process?
BTW, there's a demo debugger in OpenSolaris, you might want to check how files are opened there. See http://cvs.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/cmd/sgs/librtld_d b/rdb_demo/
In particular,
http://cvs.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/cmd/sgs/librtld_d b/rdb_demo/common/main.c#70