Hans Mulder writes:
> On 24/12/12 01:50:24, Olive wrote:
> > My goal is to write a script that 1) write something to stdout; then
> > fork into the background, closing the stdout (and stderr, stdin) pipe.
> >
> > I have found this answer (forking -> setsid -> forking)
> > http://stackoverflow.co
On Wednesday 02 September 2009 05:57:02 Shan wrote:
> I have XML RPC Server listening on a port. This XML RPC Server works
> fine when i run it as foreground process. All the clients are able to
> connect with the XML RPC Server. But when i run it as daemon(not using
> &. I am doing it in python wa
En Wed, 02 Sep 2009 00:57:02 -0300, Shan
escribió:
I have XML RPC Server listening on a port. This XML RPC Server works
fine when i run it as foreground process. All the clients are able to
connect with the XML RPC Server. But when i run it as daemon(not using
&. I am doing it in python way o
I have XML RPC Server listening on a port. This XML RPC Server works
fine when i run it as foreground process. All the clients are able to
connect with the XML RPC Server. But when i run it as daemon(not using
&. I am doing it in python way only), then no clients are able to
connect with the Server
ctly a
> > Python application and could not find anything quite like it.
>
> Note that, as described in PEP 3143, “daemonize a program” means
> nothing more than making the *current program* become a daemon
> process. It implies nothing special about external interaction with
> tha
ze a program” means
nothing more than making the *current program* become a daemon
process. It implies nothing special about external interaction with
that process; having a service channel for controlling a separate
process isn't part of becoming a daemon.
> And now I know of python-d
(replying in ‘comp.lang.python’ for wider feedback on this issue)
On 26-Mar-2009, Francis Irving wrote:
> On Thu, Mar 26, 2009 at 12:51:06AM +1100, Ben Finney wrote:
> > The ‘python-daemon’ distribution includes a module,
> > ‘daemon.pidlockfile’. The ‘daemon.pidlockfile.PIDLockFile’ class is
> >
Ben Finney writes:
> I've submitted PEP 3143
> http://www.python.org/dev/peps/pep-3143/> to meet this need,
> and have re-worked an existing library into a new ‘python-daemon’
> http://pypi.python.org/pypi/python-daemon/> library, the
> reference implementation.
>
> Now I need wider testing and
>
> >Isn't setting the EUID and EGID something that is just as easily
> >done *after* the program achieves a daemon process?
>
> That depends.
>
> If you mean that one can ignore the uid and gid setting features of the
> proposed library so that they are not chan
On Mar 21, 11:06 pm, Ben Finney wrote:
> Floris Bruynooghe writes:
> > Had a quick look at the PEP and it looks very nice IMHO.
>
> Thank you. I hope you can try the implementation and report feedback
> on that too.
>
> > One of the things that might be interesting is keeping file
> > descriptors
which gives out user shells.
That sounds rather more specific than is needed for the generic
library being proposed here. I'm wary of adding features to an API
that is already quite complex.
Isn't setting the EUID and EGID something that is just as easily done
*after* the program achieve
ad of
> uid and gid. This is necessary, for example, to write an SSH daemon
> which gives out user shells.
That sounds rather more specific than is needed for the generic
library being proposed here. I'm wary of adding features to an API
that is already quite complex.
Isn
On Sun, 22 Mar 2009 10:19:58 +1100, Ben Finney
wrote:
Jean-Paul Calderone writes:
The biggest shortcoming seems to be a complete lack of unit tests.
A full unit test suite is in the source distribution's ‘tests/’
directory. You can run it with ‘python ./setup.py test’.
Of course this is
Jean-Paul Calderone writes:
> The biggest shortcoming seems to be a complete lack of unit tests.
A full unit test suite is in the source distribution's ‘tests/’
directory. You can run it with ‘python ./setup.py test’.
> A quick skim of the code suggests that part of it don't even work at
> all
Floris Bruynooghe writes:
> Had a quick look at the PEP and it looks very nice IMHO.
Thank you. I hope you can try the implementation and report feedback
on that too.
> One of the things that might be interesting is keeping file
> descriptors from the logging module open by default.
Hmm. I see
On Mar 20, 9:58 am, Ben Finney wrote:
> Ben Finney writes:
> > Writing a Python program to become a Unix daemon is relatively
> > well-documented: there's a recipe for detaching the process and
> > running in its own process group. However, there's much more to a
> > Unix daemon than simply detac
On Fri, 20 Mar 2009 21:47:00 +1100, Ben Finney
wrote:
[snip]
Somewhat by accident I noticed this other part of the PEP:
Other Python daemon implementations that differ from this PEP:
[snip]
* Twisted [twisted]_ includes, perhaps unsurprisingly, an
implementation of a process daemonisat
On Fri, 20 Mar 2009 20:58:58 +1100, Ben Finney
wrote:
Ben Finney writes:
Writing a Python program to become a Unix daemon is relatively
well-documented: there's a recipe for detaching the process and
running in its own process group. However, there's much more to a
Unix daemon than simply de
Now I need wider testing and scrutiny of the implementation and
> specification.
PEP: 3143
Title: Standard daemon process library
Version: $Revision: 1.1 $
Last-Modified: $Date: 2009-03-19 12:51 $
Author:Ben Finney
Status:Draft
Ty
need wider testing and scrutiny of the implementation and
specification.
One point to note: This is only intended to address the task of a
program transforming *itself* into a daemon process. If you want to
spawn off *extra* processes and manage them through a “service”
channel, you want somethin
hi,
i created a daemon process using the following code
import os
import sys
# Default daemon parameters.
# File mode creation mask of the daemon.
UMASK = 0
# Default working directory for the daemon.
WORKDIR = "/"
# Default maximum for the number of available file descript
In message <[EMAIL PROTECTED]>, paul
wrote:
> Before I had posted this question first thing I did was to look at /
> dev/ttyS0, and indeed the group is dialout (gid=20)...
What are the full protections on the serial port? That is, can you post the
output of
ls -l /dev/ttyS0
please?
--
htt
On Aug 26, 5:20 pm, Bjoern Schliessmann wrote:
> paul wrote:
> > If I put these back in and try to run the daemon, the script fails
> > when I try to connect to the serial port, with this error:
> > serial.serialutil.SerialException: Could not open port: [Errno 13]
> > Permission denied: '/dev/tty
paul wrote:
> If I put these back in and try to run the daemon, the script fails
> when I try to connect to the serial port, with this error:
> serial.serialutil.SerialException: Could not open port: [Errno 13]
> Permission denied: '/dev/ttyS0'
Did you check the permissions on this file? Often yo
I am writing a daemon process that reads data from the serial port /
dev/ttyS0. I am using pyserial & the method for setting up a daemon
described in "Chris' Python Page" (http://homepage.hispeed.ch/py430/
python/) on an Ubuntu linux pc.
Everything works great EXCEPT...
i
Ben Finney <[EMAIL PROTECTED]> writes:
> Hmm. I typed the example program in as a simplified version of what
> I'm doing; but didn't actually *run* it. When I do run it, I get no
> exception, as you say.
>
> Now I'll have to find out what significant difference there is
> between my failing code a
"Leo Kislov" <[EMAIL PROTECTED]> writes:
> On Mar 22, 11:19 pm, Ben Finney <[EMAIL PROTECTED]> wrote:
> > The problem I'm having is that 'os.setsid()' fails with 'OSError:
> > [Errno 1] Operation not permitted' unless I run the program as the
> > root user. This isn't a program that I want necessa
On Mar 22, 11:19 pm, Ben Finney <[EMAIL PROTECTED]> wrote:
> Howdy all,
>
> For making a Python program calve off an independent daemon process of
> itself, I found Carl J. Schroeder's recipe in the ASPN Python Cookbook.
> http://aspn.activestate.com/ASPN/Cookbook/Python/
Howdy all,
For making a Python program calve off an independent daemon process of
itself, I found Carl J. Schroeder's recipe in the ASPN Python Cookbook.
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/278731>
This is a thorough approach, and I'm cribbing a simpler proc
I didn't actually write this module. I believe I found it in a
discussion in ASPN at Active State.
Thanks for the input, and when I get a chance I will try these alternate
approaches. This module has been working fine for me as is--so far.
Eirikur
--
http://mail.python.org/mailman/listinfo
On Fri, 23 Feb 2007 08:30:07 -0600, Nick Craig-Wood <[EMAIL PROTECTED]> wrote:
>Eirikur Hallgrimsson <[EMAIL PROTECTED]> wrote:
>
> [snip]
>
>> if (not os.fork()):
>> # hang around till adopted by init
>> ppid = os.getppid()
>> while (ppid != 1):
>>
Eirikur Hallgrimsson <[EMAIL PROTECTED]> wrote:
> def daemonize():
> if (not os.fork()):
> # get our own session and fixup std[in,out,err]
> os.setsid()
> sys.stdin.close()
> sys.stdout = NullDevice()
> sys.stderr = NullDevice()
That doesn't close
Benjamin Niemann wrote:
>> What is the easiest way to create a daemon process in Python? Google
>> says I should call fork() and other system calls manually, but is
>> there no os.daemon() and the like?
> You could try
> <http://aspn.activestate.com/ASPN/Cookbook/
On 2007-02-22, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> I understood there is no shortcut function like BSD daemon(). I'll do
> it manually using examples from cookbook...
Sure would be nice if somebody posted one. ;)
--
Grant Edwards grante Yow! Oh, I get
Thanks all,
I understood there is no shortcut function like BSD daemon(). I'll do
it manually using examples from cookbook...
On 2月22日, 午前1:41, Benjamin Niemann <[EMAIL PROTECTED]> wrote:
> Hello,
>
> Sakagami Hiroki wrote:
> > What is the easiest way to create
On Feb 21, 3:34 pm, Benjamin Niemann <[EMAIL PROTECTED]> wrote:
> That's not a daemon process (which are used to execute 'background services'
> in UNIX environments).
I had not tested this by running the script directly, and in writing a
response, I found out that th
[EMAIL PROTECTED] wrote:
> On Feb 21, 9:33 am, Eirikur Hallgrimsson <[EMAIL PROTECTED]>
> wrote:
>> Sakagami Hiroki wrote:
>> > What is the easiest way to create a daemon process in Python?
>
> I've found it even easier to use the built in threading modules
On Feb 21, 9:33 am, Eirikur Hallgrimsson <[EMAIL PROTECTED]>
wrote:
> Sakagami Hiroki wrote:
> > What is the easiest way to create a daemon process in Python?
I've found it even easier to use the built in threading modules:
import time
t1 = time.time()
print "t_poc.
Sakagami Hiroki wrote:
> Hi,
>
> What is the easiest way to create a daemon process in Python?
I find that this works great. I just pasted my copy, I think you can
find it via Google.
Eirikur
# Daemon Module - basic facilities for becoming a daemon process
# By Coy Krill
# Combi
Hello,
Sakagami Hiroki wrote:
> What is the easiest way to create a daemon process in Python? Google
> says I should call fork() and other system calls manually, but is
> there no os.daemon() and the like?
You could try
<http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/2
Hi,
What is the easiest way to create a daemon process in Python? Google
says I should call fork() and other system calls manually, but is
there no os.daemon() and the like?
Regards,
--
Sakagami Hiroki
--
http://mail.python.org/mailman/listinfo/python-list
>>
>> 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 the real processes ran. I
>> think this is a better way to stop gnuchess, as you are 100% sure, that
>> it'll stop.
>>
>> Ca
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
ld make a process a
> daemon process, and it would only run as long as the real processes ran. I
> think this is a better way to stop gnuchess, as you are 100% sure, that
> it'll stop.
>
> Can you do this with popen?
>
> --
> Thomas
--
http://mail.python.org/mailman/listinfo/python-list
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 the real processes ran. I
think this is a better way to
45 matches
Mail list logo