Virtually the best blog on the web!
Archive for October, 2005
Google SoC List of Projects
Oct 26th
Finding the Absolute Path of a Running Process
Oct 26th
A friend of mine recently asked me about finding the absolute command path of a process given the pid. Ofcourse, it’s very easy to do it for a particular OS. Doing it platform independently is actually a little tough. There’s no straight-forward POSIXy way of doing this (as far as I know). One can certainly do some /proc magic, but that won’t be portable. My suggestion was to just use ps. This works for both Solaris and Linux. So, you get the output from
ps -p <pid> -f UID PID PPID C STIME TTY TIME CMD draganm 17198 17193 0 20:40:40 ? 0:00 csh -c /usr/lib/ssh/sftp-server
and simply do some string manipulation to get the required string (shown in bold above). Any other ideas folks?
Specifications: Good or Bad?
Oct 2nd
Haven’t been blogging lately, as I am trying to unplug from the non-stop sleepless nights of work, and get back to normal life. It felt so good to sleep at 11:30pm ! Finally, I got the Google check for 4k$. I got a little worried when they sent the 500$ check early, but my mentor assured me that the check is in the mail.
Ok, coming to the topic of this post, there has been some heated discussion about specifications on LKML, and Linus pretty much said that specs are useless. Read the thread in all its glory on Google groups. A summary of the thread is available on Kerneltrap.
As for the specs, I think they are a necessary evil. His example of OSI vs TCP is the standard way of saying that specs are useless, but like Tanenbaum pointed out in his book, timing matters. Specs may not be useful for providing implementation ideas, but they certainly are required to bring order to chaotic computing world. As a good example of specs, I want to point out at the FTP and SMTP protocols. They are well written and useful while doing implementation in my opinion. As a bad example, the grid protocol specs are horrendous and pretty much useless for anyone who didn’t write them.