X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:message-id:to:subject:from:in-reply-to :references:mime-version:content-type:content-transfer-encoding; q=dns; s=default; b=hsU32g9GymFOfA0hN9Siaiud1RdxyIvNRI3QWQcdYv+ EpU6UOV8SqbkRAuO4RDyxcQoZFhnERrDsIgLG9OQVTg0EDVuAPbZf+4+dqfR+t1a PeuoDrcOk944CckKdDZs5fwsMfFuvd8Jfxw7jClIijo5ABzPcrBt6idj5twNh6+4 = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:message-id:to:subject:from:in-reply-to :references:mime-version:content-type:content-transfer-encoding; s=default; bh=o+TFZsyBjZu6piAaWKilcJ3iMbc=; b=lS5wxHeV7KMf+/I1f bx6DRJEHMvbS4LV2KUlduv15tgsbimeipZnYhM0BPmKq8mgvf+vgnANS0IqugcSV MG39iLe8pYDHK7vhkVfAuJGVRzYJ/ap2m65rRd/igE2gN+LaUmu0sIQj0kikOPuE H6tuFGsUAiPE/ThfKxqBID/fEY= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.2 required=5.0 tests=BAYES_05,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=H*f:sk:1408535, H*i:sk:1408535, H*MI:sk:1408535, H*x:version X-HELO: msa02b.plala.or.jp Date: Thu, 12 Jan 2017 23:41:35 +0900 (JST) Message-Id: <20170112.234135.194683198576068158.trueroad@trueroad.jp> To: cygwin AT cygwin DOT com, anrdaemon AT yandex DOT ru Subject: Re: rename() cannot replace the file which is opened with writable access From: Masamichi Hosoda In-Reply-To: <1408535997.20170112083918@yandex.ru> References: <20170112 DOT 090746 DOT 2056666314950620331 DOT trueroad AT trueroad DOT jp> <1408535997 DOT 20170112083918 AT yandex DOT ru> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-VirusScan: Outbound; msa02m; Thu, 12 Jan 2017 23:41:35 +0900 >> I've found that rename() cannot replace the file >> which is opened with writable access on Cygwin. >> On Linux, it works. > > It is OS dependent behavior, and vary even on same OS. > Windows may let you rename a file, or may not, depends on how exactly it is > opened. Thank you for your answer. If I understand correctly, POSIX behavior should be able to replace the writable opened file by rename(). But, It does not work on my Cygwin environment. Is it no problem if Cygwin's behavior is different from POSIX behavior? If so, we need different application handling for Cygwin and POSIX. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple