Don't use /proc to test if a process is running, use kill(, 0).