pidof is a program that reports the PID of a process that has the given command line. It has an option x which means “scripts too”. The idea behind this is if you have a shell script it will find it. Recently there was an issue raised saying pidof was not finding a shell script. Trying it out, pidof indeed could not find the sample script but found other scripts, what was going on?
I made a change recently on the gjay program. gjay is a gtk program that basically analyzes your music and makes playlists. There is a gui frontend and a analyzer back-end and they communicate through a pipe.
One really useful debugging option gtk has is to make warnings fatal, so when gtk finds one it crashes at that point and you can use gdb to trap it. The flag is –g-fatal-warnings. I have been updating gjay and initially it didn’t have this option, so I needed to add the gtk options, which is a simple one-liner.
Continue reading “Forking processes and Gtk2”
Depending on the application, sometimes you want to have some socket operations going (such as loading a website) and have stdin being read. There are plenty of examples for this in python which usually boil down to making stdin behave like a socket and mixing it into the list of sockets select() cares about.
A while ago I asked an email list could I have pysnmp use a different socket map so I could add my own sockets in (UDP, TCP and a zmq to name a few) and the Ilya the author of pysnmp explained how pysnmp can use a foreign socket map.
Continue reading “Mixing pysnmp and stdin”
I looked at two interesting issues today around the ps program in the procps project. One had a solution and the other I’m puzzled about.
ps User-defined Format
Issue #9 was quite the puzzle. The output of ps changed depending if a different option had a hyphen before it or not.
First, the expected output
$ ps p $$ -o pid=pid,comm=comm pid comm 31612 bash
Next, the unusual output.
$ ps -p $$ -o pid=pid,comm=comm pid,comm=comm 31612
I recently received Debian bug report #798350 where the user had a problem with wordpress. After upgrading to version 4.3, the webservers performance degrades over time. The problem is also reported at the wordpress site with bug WordPress ticket 33423 including the fix.
I have backported the relevant changeset and uploaded Debian wordpress package 4.3+dfsg-2 which only contains this changeset. For a lot of people, including myself, you probably won’t hit this bug but if it impacts you, then try this update.