X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 60D34385ED69 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1715025766; bh=oM+wOKqPMsRcZ14Im/iCezOMWnCZG11peQd7NnhsChM=; h=Date:Subject:To:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=kDma8bPBIqzxQN6cJ8+p/2HV4tLVDrOOTjLFWRsUVzUh8PMLM2z2UEx1VTubu86dH OMeEUXxE4F7NTpzxUhEeKjlbzRsKCT1G/5wyc0sIpbALKBlcP6+emNO256RxYx/ha2 Dr+vEd0z0S2p7IXFvCLizEULDGF5wZKtSauoQ/ow= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 158193858D39 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 158193858D39 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715025714; cv=none; b=xWYRIAeaoXMBTmkCW75kriUlTSqCdaRVJcJhqTTZ5SkPMxvWXiIdFjqikGSxwvrRm6isQ+qMF+GOC9ZTk9uOxe6wOxH1YunM9U7sHy7P+bM3BGLAWYv9cyxM0IYKhx0DLsz82fFJtpSlMVOZbVKyNzbJkuRzduvaeDVFPzzTreA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715025714; c=relaxed/simple; bh=IRtfhApTAZuZd+vsuzNUmOE36kUu2ykZDCnHDSrUUnI=; h=DKIM-Signature:Message-ID:Date:MIME-Version:From:Subject:To; b=JxqkCGimg0FZzRIsxb7uq4L9lxor0cLk3zBJ5evDooKlwvls2kpweO4KHiHH4aEUayH4YC84e4VqkxrM3WekKyVPIOxJQ98PYlrT8Hiil4ysxOoq5OnIqwYmQAbfKdD3wJONlb+ZFeuvTp7HpYZPfJ+uHb+jdXjbT86BiDcaiLE= ARC-Authentication-Results: i=1; server2.sourceware.org X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715025711; x=1715630511; h=content-transfer-encoding:content-language:to:subject:from :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=IRtfhApTAZuZd+vsuzNUmOE36kUu2ykZDCnHDSrUUnI=; b=XsSQfowgReg3DUDVMkF/8Jgm7Vu2xVUBGXtsLasDOHvGRMS54BcrTf2tHjyMaAKbro MttqUg3AkJ1fJaQeIfyOIlJ7nLBD/8Eu/9owyTGjdN29hfNlrTHeXn8879IyNmseqqF0 eK/YSfxz0IWzYoEIv08zRAAzTkQXySObvIZWzYalQj9AX5yWnTXDhIpSBaJT0OEnrx8j od0R5enaMxvmzkP/ALEEEl9e2AEg5/gHxIvo0FZzO0DPhIskfqySzUd1F2emPIi1PVma t30Gdr5wjN1AjsmUabQlh7sP/rqTv3rWCLFBS15C+rTBjDJfn5+ID2q/NNSOR3Eg1Bla Tz/A== X-Gm-Message-State: AOJu0YxY6rTQTxPb5c77ECZIu0roCR55CJtVyh+fYi9jX2jaeY5yqWAJ lTUx9flQSlT3+0zu4qsbHGlT4ZX0eyEDl1JE+usK+erL4oJNVNRvm0yuUXp+ X-Google-Smtp-Source: AGHT+IHOqk+/tsOLfUwkJFO8Ygzt02AjO/xHKp7rJrjdkXK7N9Bwu8Z4JgwQxVWgzF+tpkFUVmQbzw== X-Received: by 2002:a2e:2406:0:b0:2e2:5fd:7030 with SMTP id k6-20020a2e2406000000b002e205fd7030mr6994857ljk.13.1715025710687; Mon, 06 May 2024 13:01:50 -0700 (PDT) Message-ID: <10838112-58af-4b53-baac-39ab849662a4@gmail.com> Date: Mon, 6 May 2024 23:01:49 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: SIGALRM is not interrupting a blocking write to a pipe To: cygwin AT cygwin DOT com Content-Language: en-US X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, 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.30 List-Id: General Cygwin discussions and problem reports List-Archive: List-Post: List-Help: List-Subscribe: , From: ilya Basin via Cygwin Reply-To: ilya Basin Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Cygwin" Hi List! I need your help with troubleshooting an issue with "pv": https://codeberg.org/a-j-wood/pv/issues/87 This app uses SIGALRM to interrupt a blocking write to STDOUT and read more data into the buffer. On Linuxes write() returns 0 after the signal, but on Cygwin even though the signal handler is called, the write call does not return, at least when writing to a pipe. In the user guide it says "All sockets are non-blocking under the hood to allow to interrupt blocking calls by POSIX signals". It doesn't mention pipes, but I think the pipes should also be non-blocking under the hood. In main.c the use of O_NONBLOCK is commented with "this can cause problems with (broken) applications such as dd". If I uncomment it the app is able to detect that the pipe is ready for writing. Have you ever heard about O_NONBLOCK breaking dd? -- 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