Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.