Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Random832 Newsgroups: comp.lang.python Subject: Re: Remove directory tree without following symlinks Date: Sat, 23 Apr 2016 17:07:14 -0400 Lines: 7 Message-ID: References: <571a3ba2$0$1597$c3e8da3$5496439d@news.astraweb.com> <1461445634.3526932.587637385.4FF8AC49@webmail.messagingengine.com> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de dBgp6EBNctXOYg5RBTg6LQ1VEa7XgLhikGm5356TftIw== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.006 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'descriptor': 0.09; 'received:internal': 0.09; '23,': 0.16; 'descriptors.': 0.16; 'message-id:@webmail.messagingengine.com': 0.16; 'received:10.202': 0.16; 'received:10.202.2': 0.16; 'received:10.202.2.212': 0.16; 'received:66.111': 0.16; 'received:66.111.4': 0.16; 'received:io': 0.16; 'received:messagingengine.com': 0.16; 'received:psf.io': 0.16; 'subject:Remove': 0.16; 'wrote:': 0.16; 'linux,': 0.18; 'changes': 0.20; 'sat,': 0.23; 'specified': 0.23; 'header:In-Reply-To:1': 0.24; 'this.': 0.28; 'fork': 0.29; 'open': 0.33; 'file': 0.34; 'running': 0.34; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; 'received:66': 0.38; 'rather': 0.39; 'to:addr:python.org': 0.40; 'header:Message-Id:1': 0.61; 'high- quality': 0.63; 'risk': 0.68; 'subject:tree': 0.84 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=mO+Neu0LZAf3jSWUxe5g77r5Nvs=; b=O/ligI jqwxLfPqcSC54Yw5VX9oTZ5ID4e2EkvFdJPP1bstvNko1CZgsnxAaS+V8UfHIcmF mVmafqDG5iZn7th1mcOHpexHiZk8QHZXd+y+DjCY+TZYx1uF6D70Pa70MLbcrJyf RQaU/0lb6upJ6Yy81UMnmKrBZ5FDcF1lpZJZ8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=mO+Neu0LZAf3jSW Uxe5g77r5Nvs=; b=nL6SoENWXb7Q6gJcVxJ00CB9IHXovUIjNW2hok4m+nYKehH g4lpG4+soyAxP6MMf94lPxE5tROY7lfX8EXlUcHczfrKw5SeLV9uK72nfEV0izlR S2fBgz2/LQB9wseHoiR5EEysMFeN61XzMJe3Vo328dLgjhdngMHvSRuhR2dk= X-Sasl-Enc: alrxCuyTlMBUNh6khW0CdAMXiKK7aaNemxxFNqOx6fM8 1461445634 X-Mailer: MessagingEngine.com Webmail Interface - ajax-76f1c811 In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <1461445634.3526932.587637385.4FF8AC49@webmail.messagingengine.com> X-Mailman-Original-References: <571a3ba2$0$1597$c3e8da3$5496439d@news.astraweb.com> Xref: csiph.com comp.lang.python:107520 On Sat, Apr 23, 2016, at 12:29, Nobody wrote: > On Linux, an alternative is to use fchdir() rather than chdir(), which > changes to a directory specified by an open file descriptor Of course, then there's also the risk of running out of open file descriptors. High-quality implementations of rm will fork to deal with this.