Daemon strategy

Timo Furrer tuxtimo at gmail.com
Fri Feb 5 13:58:42 EST 2016


As Ben already said .. either deploy to Unix systems or use
subprocess.Popen and detach the process:

from subprocess import Popenfrom win32process import DETACHED_PROCESS
Popen(["YOURPROCESS"],creationflags=DETACHED_PROCESS,shell=True)



On Fri, Feb 5, 2016 at 10:52 AM, Ben Finney <ben+python at benfinney.id.au>
wrote:

> paul.hermeneutic at gmail.com writes:
>
> > It appears that python-deamon would be exactly what I need. Alas,
> > appears not to run on Windows. If I am wrong about that, please tell
> > me.
>
> You're correct that ‘python-daemon’ uses Unix facilities to create a
> well-behaved Unix daemon process.
>
> Since MS Windows lacks those facilities, ‘python-daemon’ can't use them.
>
> > To what tools should I turn?
>
> If what you need – the support to create a Unix daemon process – is
> available only on Unix by definition, it seems you'll need to deploy to
> Unix.
>
> > I am not eager to produce a "service" on Windows unless it cannot be
> > avoided.
>
> Agreed :-)
>
> --
>  \     “Wrinkles should merely indicate where smiles have been.” —Mark |
>   `\                                    Twain, _Following the Equator_ |
> _o__)                                                                  |
> Ben Finney
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>



-- 
*Timo Furrer*

https://github.com/timofurrer
tuxtimo at gmail.com



More information about the Python-list mailing list