Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #34617 > unrolled thread
| Started by | peter <pjmakey2@gmail.com> |
|---|---|
| First post | 2012-12-11 10:34 -0300 |
| Last post | 2012-12-11 16:15 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: forking and avoiding zombies! peter <pjmakey2@gmail.com> - 2012-12-11 10:34 -0300
Re: forking and avoiding zombies! Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> - 2012-12-11 16:15 +0100
| From | peter <pjmakey2@gmail.com> |
|---|---|
| Date | 2012-12-11 10:34 -0300 |
| Subject | Re: forking and avoiding zombies! |
| Message-ID | <mailman.725.1355233352.29569.python-list@python.org> |
On 12/11/2012 10:25 AM, andrea crotti wrote: > Ah sure that makes sense! > > But actually why do I need to move away from the current directory of > the parent process? > In my case it's actually useful to be in the same directory, so maybe > I can skip that part, > or otherwise I need another chdir after.. You don't need to move away from the current directory. You cant use os to get the current work directory stderrfile = '%s/error.log' % os.getcwd() stdoutfile = '%s/out.log' % os.getcwd() then call the daemon function like this. daemonize(stdout=stdoutfile, stderr=stderrfile)
[toc] | [next] | [standalone]
| From | Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> |
|---|---|
| Date | 2012-12-11 16:15 +0100 |
| Message-ID | <ka7imb$qpe$1@r03.glglgl.gl> |
| In reply to | #34617 |
Am 11.12.2012 14:34 schrieb peter: > On 12/11/2012 10:25 AM, andrea crotti wrote: >> Ah sure that makes sense! >> >> But actually why do I need to move away from the current directory of >> the parent process? >> In my case it's actually useful to be in the same directory, so maybe >> I can skip that part, >> or otherwise I need another chdir after.. > You don't need to move away from the current directory. You cant use os > to get the current work directory > > stderrfile = '%s/error.log' % os.getcwd() > stdoutfile = '%s/out.log' % os.getcwd() ITYM os.path.join(os.getcwd(), 'error.log') resp. os.path.join(os.getcwd(), 'out.log') Thomas
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web