DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 53CDLgwQ102643 Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 53CDLgwQ102643 Authentication-Results: delorie.com; dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=nqCDL3Vs X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A26B0382C16B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1744464100; bh=q3VKhJaeT5jVDr/pbGqLwOpNCK9Rw67Y1WNG+glsfNM=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=nqCDL3VshArd6ZX/kIS3wZui18gLw+99Qck1Bg6UHqNyAN76vU/8EiD004cc1PU5o Et0drTSjSkXl8kdpsG6XZ+DJ9Vfpfhu3HvwYMCWioN9gD8Kk0wC+C5TS9/FWrdb6de fRuDwWzVgJwr6SW+aM8/mUlDL5xeXb3wyWk6mPes= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 132D43858C24 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 132D43858C24 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1744464075; cv=pass; b=TSDQSCcw+V3aA1Wed3gAKAkEG4p29ulZetagTKmX7UCZ4yT63cNBqbp/ftRZh1Ni0hmDl5ntK9ql5pCZiCM/Ftyt8wOXrmOMgpQQ/6bx7eR+kbagBrk6g8Cx/XRwOdehTwhrM4vLVBcPnrnONSbnKFinMvGFTiAy2nizjuxGY9s= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1744464075; c=relaxed/simple; bh=oIXY4B9MpeJb3WkrM8XI44b4KbUMNq/d8XM3oVChREc=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=VU33GxywHJ+Z77iHcWVX1u+ztDTuhxo5eclEnFtK96CemKRgWqJOdEUscn0g3fPeU/5oakSK7+czwr0f0aJ4NdgAg7WuHr7fzZoOa1BB7y2shjHZVfxOgcHwtn2KeYcFRoWXB4NSbQuMdQbKd6nCTW3E2kb+3/t4HpKrAWiYljI= ARC-Authentication-Results: i=2; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 132D43858C24 ARC-Seal: i=1; a=rsa-sha256; t=1744464073; cv=none; d=strato.com; s=strato-dkim-0002; b=Co81j4AlQsK8Sym1F4lKJH0Lcbipn5GYtTON6kzQ6WlqNMgK4MifaDxZK7iW+ZN5Pw Djz6/r8qPOaKFAC8ZEZA8P52aUymTqN33l+zxPhfmkkwJoDJkX+FfPdWTT91AM5Rc8z6 6I+eT/aDpTXNEZ3GluthmYTLxJniJZFrOVfTezxEVHe8mjWE/jWAgFQA1vcMbWYz77D+ A5GluWlzBPLpu5kKncOMpiv22iEeHW6Rbzr5lEH8o6fB9apIcC8dKIExK6cuDUic6Euy pQjp6Z8N5pskvEFd7eUZDNutv2rMgGTw71Ot4lIEvtu8H5V7H9XKcyFEaAHXS8+11Mmp EkHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1744464073; s=strato-dkim-0002; d=strato.com; h=Message-ID:Date:Subject:To:From:Cc:Date:From:Subject:Sender; bh=nKk8yM3hBr8gTpqkAwwfrTbnLAKz4dBEsctOzW6tKc4=; b=Z1cWvLbcrMeR33H92CDXcIHSnWHOUuoNaT12wxP+NiyhQd6LbXPJljZmf91vuKI/ic +hVu6bqS7t0DO29t/VJijI7NPYBjKqy16d4gxG4Fh0ozW6UQptuIxT5vFeVljXwteemf AxGsaoEXoSa1Ot2Ebcx36tFLusmw1v27W0u2wIdV58EYaC2dLFJc3zaEkSSnzW69KkSE GGwIfCDh6X3tnGciXwTzNgO4o0+GCdLbMiPQOvGFkwNeDj5yCb43HPTR6+uZSvzwftSV GbMaDL5y7N0jbHOfdSDROi9Ebni5/HZEwcH1fzC+TjJ/Ke93P2Wk82HJFNXSMsdPJlri 1tkA== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo00 X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlLnY4jECd2hdUURIbZgL8PX2QiTuZ3cdB8X/nqmyREzwwnPW1HnaQ5tUNf1W9WTwW" To: cygwin AT cygwin DOT com Subject: /dev/null regression in Cygwin 3.6.1 Date: Sat, 12 Apr 2025 15:21:12 +0200 Message-ID: <10514352.ICPdZLu4VQ@nimes> Organization: GNU MIME-Version: 1.0 X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.30 List-Id: General Cygwin discussions and problem reports List-Archive: List-Post: List-Help: List-Subscribe: , From: Bruno Haible via Cygwin Reply-To: Bruno Haible Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Cygwin" Hi, In Gnulib, we have a unit test that compiles the program below as a native Windows program (either with mingw or with MSVC), that exercises the Gnulib select() function Then it does (in a Cygwin shell): rm -f t-select-in.tmp ./test-select-fd.exe r 0 t-select-in.tmp < /dev/null cat t-select-in.tmp Up to Cygwin 3.6.0, the contents of the file t-select-in.tmp was "1", like on most other OSes, indicating that the program can read() from file descriptor 0. In Cygwin 3.6.1, the contents of the file t-select-in.tmp is "0", indicating that read()ing from file descriptor 0 would block. This is a regression. Looking through the commits between 3.6.0 and 3.6.1, the most likely culprit is commit d750786e7de013b58e2968eeb6a7fd59dcc535c9 . Bruno =============================== test-select-fd.c =============================== #include #include #include #include int main (int argc, char *argv[]) { if (argc == 4) { char mode = argv[1][0]; if (mode == 'r' || mode == 'w') { int fd = atoi (argv[2]); if (fd >= 0) { const char *result_file_name = argv[3]; FILE *result_file = fopen (result_file_name, "wb"); if (result_file != NULL) { fd_set fds; struct timeval timeout; int ret; FD_ZERO (&fds); FD_SET (fd, &fds); timeout.tv_sec = 0; timeout.tv_usec = 10000; ret = (mode == 'r' ? select (fd + 1, &fds, NULL, NULL, &timeout) : select (fd + 1, NULL, &fds, NULL, &timeout)); if (ret < 0) { perror ("select failed"); exit (1); } if ((ret == 0) != ! FD_ISSET (fd, &fds)) { fprintf (stderr, "incorrect return value\n"); exit (1); } fprintf (result_file, "%d\n", ret); exit (0); } } } } fprintf (stderr, "Usage: test-select-fd mode fd result-file-name\n"); exit (1); } ================================================================================ -- 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