On Jul 10, 1:25 am, Larry Bates <[EMAIL PROTECTED]> wrote:
> Gros Bedo wrote:
> > Hello :-)
>
> > I have a question about Python and Linux shell. I have a python program 
> > which is permanently resident in the end-user system. I'm currently 
> > producing a RPM package, and it works nicely. The problem is that when I 
> > uninstall it, my program keeps running in the background, even if the files 
> > are deleted.
>
> > I know I can terminate python shell directly, but this is not a good idea 
> > because the end-user may be working with another important python 
> > application, and would be very angry if mine would close everything that is 
> > using python shell.
>
> > So, is there a way from the Linux shell or a bash script to terminate just 
> > one specific Python script ?
> > _________________________________________________________________
> > Votre contact a choisi Hotmail, l'e-mail nouvelle génération. Créez un 
> > compte.
> >http://www.windowslive.fr/hotmail/default.asp
>
> You should use the signal module to look for SIGINT signal and exit if it is
> received.
>
An alternative, though crude, hack is for the script to check for the
existence (or non-existence) of a special file and quit if found (or
not found). It could also create it when it starts or delete it when
it quits, as appropriate.
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to