Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On Ubuntu Server I've written a c++ program which launches another process which is in python. The c++ process runs fine on startup but the python process never launches. It gets created and when I run "top" I can see that both process's are running but next to the one that says python it reads python defunct. I've created the startup script in /etc/init.d and updated rc.d. Is there something else I have to do in order for it to see the python application?

share|improve this question
up vote 3 down vote accepted

If it's in the process list at all, then the process is being started, but if it switches to "defunct" then it's dying (the hanging around in the process list is because you're not calling wait() to clean up). Try running the python script by itself to see why it's failing (if there's no obvious error on the command line, then it'll almost certainly be an environment or search path issue, which you can simulate by setting your shell environment to match that of the init script).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.