Re: python-daemon and PID files

2017-03-06 Thread Ben Finney
Ethan Furman writes: > On 03/04/2017 09:09 PM, Ian Pilcher wrote: > > > Is it possible to get python-daemon to create "systemd style" PID > > file? Short answer: No, that's the job of whatever ‘pidfile’ object you provide. Medium answer: Yes, by implementing that behaviour in the object you ch

Re: python-daemon and PID files

2017-03-05 Thread Ian Pilcher
On 03/04/2017 11:14 PM, Chris Angelico wrote: Why do you need a pidfile? When I get systemd to start a process, I just have it not fork. Much easier. Forget about python-daemon - just run your script in the simple and straight-forward way. Because forking daemons was good enough for my grandpap

Re: python-daemon and PID files

2017-03-04 Thread Ethan Furman
On 03/04/2017 09:09 PM, Ian Pilcher wrote: Is it possible to get python-daemon to create "systemd style" PID file? I.e., systemd wants a daemon to write a file with a specific name that *contains* the PID of the child process. python-daemon, OTOH, seems to use its pidfile parameter as more of

Re: python-daemon and PID files

2017-03-04 Thread Chris Angelico
On Sun, Mar 5, 2017 at 4:09 PM, Ian Pilcher wrote: > Is it possible to get python-daemon to create "systemd style" PID file? > > I.e., systemd wants a daemon to write a file with a specific name that > *contains* the PID of the child process. python-daemon, OTOH, seems to > use its pidfile parame

Re: python-daemon for Python v3

2014-08-22 Thread Terry Reedy
On 8/22/2014 9:09 PM, Y@i$el wrote: A mi si me ha dado problemas. No tengo forma de decirle que se ejecute como usuario www-data y cuando lo intento deja de funcionar abruptamente. I can almost, but not really understand and translate the question. Possiblemente debe visitar un grupo in espan

Re: python-daemon for Python v3

2014-08-22 Thread Y@i$el
A mi si me ha dado problemas. No tengo forma de decirle que se ejecute como usuario www-data y cuando lo intento deja de funcionar abruptamente. Saludos. -- https://mail.python.org/mailman/listinfo/python-list

Re: python-daemon for Python v3

2014-06-26 Thread ryuanerin
2014년 1월 19일 일요일 오후 7시 30분 27초 UTC+9, Asaf Las 님의 말: > Hi Community > > > > Is there ported to Python v3 python-daemon package? > > > > https://pypi.python.org/pypi/python-daemon/ > > > > i am afraid it is not as simple as correction of relative path input > > feature and except clauses

Re: python-daemon interaction with multiprocessing (secure-smtpd)

2014-05-07 Thread Antoon Pardon
op 07-05-14 21:11, Grant Edwards schreef: > > Mainly, I'm just trying to figure out the right way to terminate the > server from an /etc/init script. > As far as I understand you have to make sure that your daemon is a proces group leader. All the children it will fork will then belong to its pro

Re: python-daemon interaction with multiprocessing (secure-smtpd)

2014-05-07 Thread Grant Edwards
On 2014-05-07, Grant Edwards wrote: > With Python 2.7.5, I'm trying to use the python-daemon 1.6 and its > DaemonRunner helper with the seucre-smtpd 1.1.9 which appears to use > multiprocessing and a process pool under the covers. There seem to be > a couple process issues: > > 1) The pid file

Re: python-daemon interaction with multiprocessing (secure-smtpd)

2014-05-07 Thread Grant Edwards
On 2014-05-07, Ben Finney wrote: > Grant Edwards writes: > >> On 2014-05-07, Grant Edwards wrote: >> > How do you terminate a Python program that's using multiprocessing? >> >> It looks like you have to kill all the threads individually. :/ > > As I understand it, the ‘multiprocessing’ modu

Re: python-daemon interaction with multiprocessing (secure-smtpd)

2014-05-07 Thread Ben Finney
Grant Edwards writes: > On 2014-05-07, Grant Edwards wrote: > > How do you terminate a Python program that's using multiprocessing? > > It looks like you have to kill all the threads individually. :/ As I understand it, the ‘multiprocessing’ module https://docs.python.org/3/library/multipr

Re: python-daemon interaction with multiprocessing (secure-smtpd)

2014-05-07 Thread Grant Edwards
On 2014-05-07, Grant Edwards wrote: > With Python 2.7.5, I'm trying to use the python-daemon 1.6 and its > DaemonRunner helper with the seucre-smtpd 1.1.9 which appears to use > multiprocessing and a process pool under the covers. There seem to be > a couple process issues: > > 1) The pid file c

Re: python-daemon for Python v3

2014-01-19 Thread Asaf Las
On Monday, January 20, 2014 8:19:04 AM UTC+2, larry@gmail.com wrote: > Nope, no problems at all. Thanks! -- https://mail.python.org/mailman/listinfo/python-list

Re: python-daemon for Python v3

2014-01-19 Thread Larry Martell
On Sun, Jan 19, 2014 at 9:57 PM, Asaf Las wrote: > On Sunday, January 19, 2014 9:30:21 PM UTC+2, larry@gmail.com wrote: >> On Sun, Jan 19, 2014 at 3:30 AM, Asaf Las wrote: >> I use this technique for demonizing: >> http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/ >>

Re: python-daemon for Python v3

2014-01-19 Thread Asaf Las
On Sunday, January 19, 2014 9:30:21 PM UTC+2, larry@gmail.com wrote: > On Sun, Jan 19, 2014 at 3:30 AM, Asaf Las wrote: > I use this technique for demonizing: > http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/ > And has been ported to 3: > http://www.jejik.com/files/

Re: python-daemon for Python v3

2014-01-19 Thread Larry Martell
On Sun, Jan 19, 2014 at 3:30 AM, Asaf Las wrote: > Hi Community > > Is there ported to Python v3 python-daemon package? > > https://pypi.python.org/pypi/python-daemon/ > > i am afraid it is not as simple as correction of relative path input > feature and except clauses in mentioned package. I use

Re: python-daemon for Python v3

2014-01-19 Thread Asaf Las
On Sunday, January 19, 2014 12:41:31 PM UTC+2, Ben Finney wrote: > Have a read through the archives for the ‘python-daemon-devel’ > discussion forum > http://lists.alioth.debian.org/mailman/listinfo/python-daemon-devel>, > where we have had discussions about porting the library to Python 3. > I'd b

Re: python-daemon for Python v3

2014-01-19 Thread Ben Finney
Asaf Las writes: > Is there ported to Python v3 python-daemon package? > > https://pypi.python.org/pypi/python-daemon/ Have a read through the archives for the ‘python-daemon-devel’ discussion forum http://lists.alioth.debian.org/mailman/listinfo/python-daemon-devel>, where we have had discussio

Re: python-daemon

2012-12-17 Thread Steven D'Aprano
On Sun, 16 Dec 2012 08:59:46 -0800, rurpy wrote: > Or you could repost from other than GG if you don't mind being a tool of > someone else's political agenda. We're all tools of someone's political agenda. -- Steven -- http://mail.python.org/mailman/listinfo/python-list

Re: python-daemon

2012-12-17 Thread rurpy
On Monday, December 17, 2012 12:33:52 AM UTC-7, Chris Angelico wrote: > On Mon, Dec 17, 2012 at 6:25 PM, wrote: > > No, that's not what you were "just" informing people of... > > you were also informing us that we are "twits" for finding > > Google Groups fits our needs better than some other cli

Re: python-daemon

2012-12-16 Thread Chris Angelico
On Mon, Dec 17, 2012 at 6:25 PM, wrote: > No, that's not what you were "just" informing people of... > you were also informing us that we are "twits" for finding > Google Groups fits our needs better than some other clients. I didn't say that. The first twit filter I met was when my dad put *his

Re: python-daemon

2012-12-16 Thread rurpy
On 12/16/2012 11:16 PM, Chris Angelico wrote: > On Mon, Dec 17, 2012 at 9:18 AM, wrote: >> On Sunday, December 16, 2012 1:25:51 PM UTC-7, Chris Angelico wrote: >>>[...] >>> If your post is swallowed by someone's twit filter, that probably >>> means that you're doing something twittish. Switching

Re: python-daemon

2012-12-16 Thread Chris Angelico
On Mon, Dec 17, 2012 at 9:18 AM, wrote: > On Sunday, December 16, 2012 1:25:51 PM UTC-7, Chris Angelico wrote: >>[...] >> If your post is swallowed by someone's twit filter, that probably >> means that you're doing something twittish. Switching to direct mail >> isn't going to win you any friends

Re: python-daemon

2012-12-16 Thread rurpy
On Sunday, December 16, 2012 1:25:51 PM UTC-7, Chris Angelico wrote: >[...] > If your post is swallowed by someone's twit filter, that probably > means that you're doing something twittish. Switching to direct mail > isn't going to win you any friends :) Switching your newsgroup client, > however,

Re: python-daemon

2012-12-16 Thread Chris Angelico
On Mon, Dec 17, 2012 at 3:59 AM, wrote: > On 12/16/2012 08:26 AM, n8fel...@gmail.com wrote: >> Hello all. Got a question for anyone out there that is willing to >> help. Looking to make a Python Daemon, Google searches lead me to >> http://pypi.python.org/pypi/python-daemon. My question is 2 part

Re: python-daemon

2012-12-16 Thread rurpy
On 12/16/2012 08:26 AM, n8fel...@gmail.com wrote: > Hello all. Got a question for anyone out there that is willing to > help. Looking to make a Python Daemon, Google searches lead me to > http://pypi.python.org/pypi/python-daemon. My question is 2 part. 1) > pip install python-daemon downloads vers

Re: python-daemon and upstart

2009-11-14 Thread Paul Rudin
Paul Rudin writes: > > So I would have expected it to be necessary in this case. Maybe this is > more an upstart issue than a python-daemon one - not sure. Aha - so I discover that if detach_process is not explicitly passed to the DaemonContext initialiser it tries to guess whether it ne

Re: python-daemon and upstart

2009-11-14 Thread Paul Rudin
Paul Rudin writes: > Ben Finney writes: > >> Paul Rudin writes: >>> description "test daemon" >>> expect daemon >>> chdir /tmp >>> exec /tmp/testdaemon.py Further experimentation reveals that by omitting the "expect daemon" stanza everything works fine. But I'm still a confused - the manpage

Re: python-daemon and upstart

2009-11-14 Thread Paul Rudin
Ben Finney writes: > Paul Rudin writes: > >> I'm experimenting with the daemon module >> and upstart >> . > > First: Thank you for using ‘python-daemon’; it's getting more widespread > use all the time, which is really help

Re: python daemon - compress data and load data into MySQL by pyodbc

2009-09-04 Thread MacRules
Dennis Lee Bieber wrote: On Thu, 03 Sep 2009 14:43:40 -0400, MacRules declaimed the following in gmane.comp.python.general: Oracle DB in data center 1 (LA, west coast) MSSQL DB in data center 2 (DC, east coast) Note that your thread subject line states MySQL... There is a big differe

Re: python daemon - compress data and load data into MySQL by pyodbc

2009-09-03 Thread Ben Finney
MacRules writes: > What I am looking for is this. > > Oracle DB in data center 1 (LA, west coast) > MSSQL DB in data center 2 (DC, east coast) > So network bandwidth is an issue Okay, that's a brief description but is clearer than we had before. > I prefer to have gzip fist and > deliver the da

Re: python daemon - compress data and load data into MySQL by pyodbc

2009-09-03 Thread MacRules
Martin P. Hellwig wrote: MacRules wrote: What I am looking for is this. Oracle DB in data center 1 (LA, west coast) MSSQL DB in data center 2 (DC, east coast) So network bandwidth is an issue, I prefer to have gzip fist and deliver the data. If bandwidth is really an issue, you should send

Re: python daemon - compress data and load data into MySQL by pyodbc

2009-09-03 Thread Martin P. Hellwig
MacRules wrote: What I am looking for is this. Oracle DB in data center 1 (LA, west coast) MSSQL DB in data center 2 (DC, east coast) So network bandwidth is an issue, I prefer to have gzip fist and deliver the data. If bandwidth is really an issue, you should send compressed delta's. I n

Re: python daemon - compress data and load data into MySQL by pyodbc

2009-09-03 Thread MacRules
Ben Finney wrote: MacRules writes: Are you a Python expert? This group has many Python experts, and even more people who can no doubt help you if you are able to articulate what you need help with. To help dispel a possible misunderstanding: Don't expect to have a one-on-one conversation wi

Re: python daemon - compress data and load data into MySQL by pyodbc

2009-09-03 Thread Ben Finney
MacRules writes: > Are you a Python expert? This group has many Python experts, and even more people who can no doubt help you if you are able to articulate what you need help with. To help dispel a possible misunderstanding: Don't expect to have a one-on-one conversation with a single devoted

Re: python daemon - compress data and load data into MySQL by pyodbc

2009-09-03 Thread David Smith
MacRules wrote: > Sean DiZazzo wrote: >> On Sep 2, 8:36 pm, MacRules wrote: >>> Hi, >>> >>> I installed Python daemon, pyodbc module to access the back-end DB >>> server. >>> >>> My setup is like this >>> >>> load data job -> Python Daemon A, port 6000 -> Python Daemon B, port >>> 7000 -> MySQL >>

Re: python daemon - compress data and load data into MySQL by pyodbc

2009-09-03 Thread MacRules
Sean DiZazzo wrote: On Sep 2, 8:36 pm, MacRules wrote: Hi, I installed Python daemon, pyodbc module to access the back-end DB server. My setup is like this load data job -> Python Daemon A, port 6000 -> Python Daemon B, port 7000 -> MySQL Daemon A will perform data compression, such as GZIP

Re: python daemon - compress data and load data into MySQL by pyodbc

2009-09-02 Thread Sean DiZazzo
On Sep 2, 8:36 pm, MacRules wrote: > Hi, > > I installed Python daemon, pyodbc module to access the back-end DB server. > > My setup is like this > > load data job -> Python Daemon A, port 6000 -> Python Daemon B, port > 7000 -> MySQL > > Daemon A will perform data compression, such as GZIP, and s

Re: Python daemon in Linux

2007-07-05 Thread [EMAIL PROTECTED]
thanx benjamin ) no more questions -- http://mail.python.org/mailman/listinfo/python-list

Re: Python daemon in Linux

2007-07-05 Thread [EMAIL PROTECTED]
As far as I understand the issue, any Python process has a sort of "main" thread. When the main thread exits, the Python process will exit if there are only daemon threads around. If there are any non-daemon threads, the Python process will only exit after those threads are finished. Or, as the doc

Re: Python daemon process

2006-08-29 Thread Thomas Dybdahl Ahle
I might not have made myself very clear, since you both got me wrong. What I need, is not a method to terminate a process, but a way to terminate a process when the main process dies. >From the atexit module info: Note: the functions registered via this module are not called when the program is ki

Re: Python daemon process

2006-08-27 Thread Paolo Pantaleo
2006/8/26, Thomas Dybdahl Ahle <[EMAIL PROTECTED]>: > Hi, I'm writing a program, using popen4(gnuchess), > The problem is, that gnuchess keeps running after program exit. > > I know about the atexit module, but in java, you could make a process a > daemon process, and it would only run as long as t

Re: Python daemon process

2006-08-26 Thread faulkner
process = subprocess.Popen(gnuchess) ... os.kill(process.pid, signal.SIGKILL) Thomas Dybdahl Ahle wrote: > Hi, I'm writing a program, using popen4(gnuchess), > The problem is, that gnuchess keeps running after program exit. > > I know about the atexit module, but in java, you could make a process