Python Process that can survive

sismex01 at hebmex.com sismex01 at hebmex.com
Fri Sep 27 18:25:43 EDT 2002


> 
> Yeah I found this hack on the web and I can't believe that this is
> only way to do this in python. You're basically stripping the process
> of all it's stream and sending it on its way. This is really messy.
> 

It isn't messy, it's the correct way to do it. You're not
stripping the process of it's streams, your disconnecting
it from it's controlling TTY, which, if it closes before
the app, sends a DIE! signal to the app; that, or your
app freezes or dies when trying to use it's console.

>
> Plus in my lab there are a bunch of perl guys and a few python people.
> To date, what one can do in their script the python guys can do to
> (only nicer and much more readible). Perl has the ability to have a
> process continue after the underlying terminal is killed if the
> process is in the background. What is python doing that doesn't allow
> this?
> 
> Chris
>

I suspect someone's yanking someone else's chain; I used to
write perl programs also, and whenever I needed an app to
totally disconnect from it's parent, I *had* to close it's
link to the console, or it's parent's console, which basically
means that I had to redirect std{in,out,err} to /dev/null,
in whatever mode you want.

It's not that nasty, you know.

-gustavo










Advertencia: 
La informacion contenida en este mensaje es confidencial y restringida y
esta destinada unicamente para el uso de la persona arriba indicada, Esta
comunicacion representa la opinion personal del remitente y no refleja
necesariamente la opinion de la Compañia. Se le notifica que esta
estrictamente prohibida cualquier difusion, distribucion o copia de este
mensaje. Si ha recibido esta comunicacion o copia de este mensaje por error,
o si hay problemas en la transmision, favor de comunicarse con el remitente.


Todo el correo electrónico enviado para o desde esta dirección será
procesado por el sistema de correo corporativo de HEB. Tal correo
electrónico esta sujeto a ser almacenado y puede ser revisado por alguien
ajeno al recipiente autorizado con el propósito de monitorear que se cumplan
las normas de seguridad de la empresa.




More information about the Python-list mailing list