Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I develop an app called Unity Mail. A quicklist option «Edit accounts data» needs to restart it.

File /usr/bin/unity-mail:

#!/bin/sh
python /usr/share/unity-mail/unity-mail.py $@

File /usr/share/unity-mail/unity-mail.py:

(Main python script)

When I try to terminate the script using killall unity-mail, the unity-mail process is killed, but python process is still running, so unity-mail is active.

I tried to put the python script directly to /usr/bin/unity-mail, but calling killall unity-mail in that case says «unity-mail: no process found».

The question:

How should I modify /usr/bin/unity-mail so that killing it will kill python also?

share|improve this question
    
Could you clarify what a quicklist option is? –  geirha Jul 8 '11 at 11:14
add comment

2 Answers

No need to change your files.

Just type pkill -f unity-mail to kill both bash script and python process.

share|improve this answer
add comment

You need to use the PID, from top on Terminal you can see the PIDs, anyways, this is better from programming side, but thats another story

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.