Friday, June 20, 2008

Finding the umask of a running process in Solaris…

…is inordinately difficult. This seemingly basic piece of information is not available through /proc, nor through dtrace, nor any other supported way. It can only be retrieved by crawling through the kernel's data structures, either with mdb(1) or through using libkvm, an even uglier way to do it.

Chad Mynhier provides the way to do it on his blog, as well as pointing to a thread on comp.unix.solaris about the same topic, showing how to do it in C using libkvm.

No comments: