subprocess confusion

Tim Arnold tiarno at
Tue Apr 17 17:48:47 CEST 2007

"Nick Craig-Wood" <nick at> wrote in message 
news:slrnf29k6m.c97.nick at
> Tim Arnold <tiarno at> wrote:
>>  Should I just put the remsh in the actual command instead of
>>  preexec_fn?
> Yes.
> The preexec_fn is run after the fork() but before the exec().  Ie a
> new process has been made, but it hasn't started your task yet.
> For example a classic use of preexec_fn is
>  preexec_fn=os.setsid
> You seem to be thinking it is pre-pending something to your command
> line which isn't how it works.
> -- 
> Nick Craig-Wood <nick at> --

Thanks much to you and Michael H. for the great explanations.
Now everything is working fine, and I understand subprocess a little better!

--Tim Arnold 

More information about the Python-list mailing list