how to detach process
Donn Cave
donn at u.washington.edu
Mon Aug 26 12:13:11 EDT 2002
Quoth noah at noah.org (Noah):
| alienoid <alienoid at is.lg.ua> wrote in message news:<mailman.1030137902.27254.python-list at python.org>...
|> I need your help with this case:
|> Program from comp A calls program written in python on comp B. The
|> program on comp B calls program C and should quit and not beeing
|> blocked waiting when program C finish(program C will be a long running
|> task). What mechanism in python should I use in program B to implement
|> that?
| I'm not sure what comp A has to do with it.
| It seems that your problem is the same even if described without comp A.
|
| It sounds like you want to create a daemon process using Python.
| In UNIX this requires a "double fork" to detatch a process
| from the controlling terminal (login shell). The following code
...
You could be right, but if you suppose that he's talking about a
remote shell type of thing, that's basically like popen with a
TCP pipe. In this case, you don't have a controlling terminal or
any of the attendant issues, it's just pipe open vs. pipe closed -
so program C probably doesn't need to do anything, just invoke it
with input, output and error redirected.
Donn Cave, donn at u.washington.edu
More information about the Python-list
mailing list