Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.017 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'os.getcwd()': 0.09; 'part,': 0.09; 'cc:addr:python-list': 0.10; 'chdir': 0.16; 'process?': 0.16; 'subject:avoiding': 0.16; 'wrote:': 0.17; 'directory.': 0.17; 'skip': 0.17; 'received:209.85.216.46': 0.21; 'cc:2**0': 0.23; 'cc:no real name:2**0': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'header :User-Agent:1': 0.26; 'am,': 0.27; 'parent': 0.29; 'this.': 0.29; 'maybe': 0.29; "skip:' 10": 0.30; 'function': 0.30; 'directory,': 0.33; 'another': 0.33; 'skip:d 20': 0.34; 'received:google.com': 0.34; 'received:209.85': 0.35; 'but': 0.36; 'message- id:@gmail.com': 0.36; 'useful': 0.36; 'why': 0.37; 'received:209': 0.37; 'received:209.85.216': 0.37; 'subject:: ': 0.38; 'sure': 0.38; 'header:Received:5': 0.40; 'received:200': 0.71; 'andrea': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=7UyciVIj9/c4l5VNshOOLY/vI7pm7MHUoYQ71RdXgA4=; b=ouNY2JiFox4yqYevDTiEAIWqSph8DRDMoQhXFB4I5g3qIVJKpyxEsiqkbQRsn/45d5 Fz94YKaNaH614vjM+kq5UVqODlMdB1ZR6eD8Ukfja8kDy8pJmuiJwtjOhDOetROGqIMs 7TCYbdoLFaAszAUeqzWlsej2xofQfBat2cllLA/OZU6z26mO09fRwdA1Z50VwrCUj5WE JtA/6YxWDy3W71vKVTZgEwIxwpsyuho7Yhj+ZrlkvsN2+sWtU2sPYeSYGvjo7jEWd0BH f8dGQDo1GEqQeOVsKEo35VRwi/XvZV6f7p5R2iksXFwyS4cx4h+taT/2S9IM1ynq8EQj L9MA== Date: Tue, 11 Dec 2012 10:34:23 -0300 From: peter User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120824 Thunderbird/15.0 MIME-Version: 1.0 To: andrea crotti Subject: Re: forking and avoiding zombies! References: <50C6153F.8050205@gmail.com> <50C7282B.8000708@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 17 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1355233352 news.xs4all.nl 6913 [2001:888:2000:d::a6]:56336 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:34617 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)