delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2022/12/21/09:30:38

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 474A43857C51
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1671633000;
bh=IFAQsd7lxEpVfIVjNwmqumdx8viDqwuPhApJ2n2Y+7U=;
h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:
From;
b=sK1cnEEjAVOWRqEV01/yBg2WMHqtdPJIFl7LHl3AJmrUiQZobEvpOtJGsJbUJsjrD
cPGjLd05TDWtJVNXzsdavvh5zqG/Djq068T90IKorx2SxdEL/JpkyHzZ0GYyHos11B
s0E6qzwYnhwdoMWTk6EfjtfY3PI8hDDpeDO5TYjY=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
Date: Wed, 21 Dec 2022 15:29:42 +0100
To: cygwin AT cygwin DOT com
Subject: Re: open /dev/null O_NOFOLLOW fails with ELOOP
Message-ID: <Y6MYVuTuofW/bC9N@calimero.vinschen.de>
Mail-Followup-To: cygwin AT cygwin DOT com
References: <Y6Lqz3O1AcAPjBRu AT xps13>
<Y6LunfrlJ1767ND5 AT calimero DOT vinschen DOT de>
MIME-Version: 1.0
In-Reply-To: <Y6LunfrlJ1767ND5@calimero.vinschen.de>
X-Provags-ID: V03:K1:j9XO050V6ky3iZDc+5k4XVcLCYLyflZc/RWnsbv2AujMdFY7WY2
adAy7kx29kChtuIqIG+lGzE8KJHBrPgCHfnkSMg58wlMukPqBk27/TK9TC3FV6k1FnbaO26
A2//4lq+uV9Pk643ui9uaa9CUQbcnOCO8P763j4pnZej+AKt3hlcZun39VtwYW0H35sR5Q8
/LaGZTVAFwwmOXNAGE1GQ==
UI-OutboundReport: notjunk:1;M01:P0:DBQhYYkj9Tg=;l0SzkR+csg34WHajU1LiirY7b4k
q9MJRvMZO+TDuatGH9QxkJ6kE3HQJ6LRaKT/dySfpRrRDBr60ihNlX+8XEgBfjE8bvT8TQm0b
tm+VvI4fOUi8szwqCNf/IszwxhE2YGxcbxR/fNj9LQrRhit4RRxlQ+6dBoHYvkPfqEb2p4Jcn
RYuh8cP60ptzWyQI/N2UBGmnmjyr74QGY81UktI/UEb7dmobxOXpqR6X4kZAMD7vvG+HFOSrC
DpnnL5+4uZqx3AqnjMK2YqtoP0K2bFtBzFo4G39GLBJObQBuuNIwOxJGkK/PGs4cVTEk1S6u3
eHOTgy0fA0qVSPA5oQmQHxjozUI34DZy7rcBl6i5GRp37BaHuzW8MANzdpsp72wm4HdfrtLU1
dKHCM/0/4HM02jNHz25XjJKQAuP6VUhtzHmU1iGiOS3rBkSXnpxTM14CiQs4UCB4lQ3Km04Qb
Hvt3STETMPVZlwUQ5gaJBe6grDaIXlPgfMc95Dr9fCJGDjwQgINUhgjli06GL5gH3jBo7XB5Z
hoZynLkIPzY9LOOkgXOIQth4wW3IANmBTVp2HZqlucHWAnSzktUwqPGpx6gK0/vJq0tItiPRw
paMq6Rrc7uM/5RDI6sd15ACAW9VeqLy6KnQGjC1wwVIfECyniQEj1HppV4c6o37+RCV7dW8ii
siVwmYKbHLXyTrTQVx2HE9LmHBFCOYm+dlI1sAOLaA==
X-Spam-Status: No, score=-96.6 required=5.0 tests=BAYES_00,
GOOD_FROM_CORINNA_CYGWIN, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE,
RCVD_IN_MSPIKE_H2, SPF_FAIL, SPF_HELO_NONE,
TXREP autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Corinna Vinschen via Cygwin <cygwin AT cygwin DOT com>
Reply-To: cygwin AT cygwin DOT com
Cc: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>

Hi Glenn,

On Dec 21 12:31, Corinna Vinschen via Cygwin wrote:
> On Dec 21 06:15, gs-cygwin.com--- via Cygwin wrote:
> > open /dev/null O_NOFOLLOW fails with ELOOP
> > 
> > Windows 10, 64-bit cygwin
> > 
> > Failed with my existing install, then I ran setup.exe, updated to
> > latest, and my tests still failed.
> > 
> > a.c
> > ---
> > 
> > #include <sys/types.h>
> > #include <fcntl.h>
> > #include <stdio.h>
> > 
> > int main (void)
> > {
> >     int fd = open("/dev/null", O_RDWR | O_NOFOLLOW, 0);
> >     if (fd < 0)
> >         perror("open(/dev/null)");
> >     return fd;
> > }
> > 
> > 
> > $ gcc a.c ; ./a.exe
> > open(/dev/null): Too many levels of symbolic links
> > 
> > While troubleshooting this, there were times where it succeeded and then
> > times where it failed, though it failed most of the time.  It did not
> > fail (or succeed) randomly, but seemingly in streaks.
> > 
> > Trying to start lighttpd seems to run into this bug reliably,
> >   $ /usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf
> > In the next release of lighttpd, I may end up omitting O_NOFOLLOW
> > if __CYGWIN__ is defined.
> 
> Thanks for the report.  I think I see what's going on, stay tuned.

I pushed a patch:
https://cygwin.com/git/?p=newlib-cygwin.git;a=commitdiff;h=09cb4cd2940f

Please try the latest test release cygwin-3.5.0-0.60.g09cb4cd2940f.
For installation, see https://cygwin.com/faq.html#faq.setup.testrels


Thanks,
Corinna

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019