Monday May 26, 2008

Is the process still running?

For some days I have been tracking down a problem which only shows itself on specific platforms and only when run in big automated settings when we try to run Slony-I tests. Off course, when we try to reproduce from our own environment, everything just works.

It turns out that due to some environment issue (PATH settings) different ps(1) commands were run on Solaris x86 and Solaris SPARC for the same user account, and that the Slony-I test suite parses ps(1) output (see _check_pid() in slony1-engine/tests/support_funcs.sh) to check if a process is still running.

I wrote a patch that used pgrep(1) to do the same in a slightly more robust way, but then Ståle - a manager! - came up to me and told me about kill -0 <pid>. How embarrassing not knowing about kill -0, and even more embarrassing being told by a manager. Anyway, now you are warned about kill -0, but knowledgeable managers I can not protect you from ;-)
 

About

I work with testing in Sun Microsystems Database Group in Trondheim, Norway, currently with MySQL 6.X. The plan is to write a little bit about what I do here. More about me at my homepage.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today