delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2018/07/21/03:04:57

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:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=WD6aOc1VMU3+5X9P
Hit+RN5aVAlCzqnWJOwlCmoaG1TLyZPsYBPoxGnNC+yPcZGV/ulrK4vGbiGUQaRA
Awkk83gH5De50A/9St9xgWqPJbOLkobjYwyqXVx8ymQfAUjpVnx5ixNmLbJ6lEgh
xLVkl7Kr3S4yqO8qTfUO7ryjJD0=
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:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=o0Sv0dzppII7st/F2XWNJU
Spldk=; b=QZRcbv7ZhOaphFluvLKALfwoSFv9/XNBm7nFTROLeRFwH1OUg32vai
L0e7tTWVZtly+NOX3IUjhmKFWkQDcDLx3a1C//VLf3Ng7dwCVzZ3sIfton7PYgn+
bmoTgYSeBs/DOtaHcVBk7q7FljV5LzPIAadI6/uoZzZecv1Ew/3as=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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-Spam-SWARE-Status: No, score=1.0 required=5.0 tests=BAYES_20,FOREIGN_BODY,FREEMAIL_FROM,GIT_PATCH_2,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.2 spammy=EMail, E-Mail, UD:avast.com, diese
X-HELO: mail-wm0-f44.google.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=doLPNtCi+6bN0BWL4JKre7qZMh5wPRR32e25/pnOMfY=; b=RqL7S+0pvUL3XjNF+QFlqCkb04nXGCJcTOZtqnj2RxNytx/MA6kRj2ON+K1hy2iklG i0VmKvsalMOoFv7SUo2SDJHJ0r2+18cU5X+y2R1BrAWTkj5S7v1muNGxA/ZNnmzFhipW 2lw/WKE/KHbvPxOSfu+ClYahln47e9blBmcmpnP1sfxsAnB6gSp0TrGrdJIua9900dIg NVQUsfCNwLgpeH2Uc9XTWSdrhubp/+XJ4fjpzo3G3z313UFUWrudXKJj8Nuxg0lvhTSP 5kBrLSlObE2CIZkIC04Bl0Q2FOPytM1b/yEuphu9SnQrjhoGKI3Ijpzxf0QHBVfFTQsN GtQw==
Subject: Re: Freeze opening /dev/stdout
To: cygwin AT cygwin DOT com
References: <CAJ+sA04Rkbq3-a-59_iRN2+zzJHZe-TE-7st88bcS8mZ2jj63A AT mail DOT gmail DOT com> <20180721101903 DOT bf7eac1aaf824d013fc507ce AT nifty DOT ne DOT jp>
From: Marco Atzeri <marco DOT atzeri AT gmail DOT com>
Message-ID: <07976515-f06b-2842-a85a-71da44f9ea97@gmail.com>
Date: Sat, 21 Jul 2018 09:04:39 +0200
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1
MIME-Version: 1.0
In-Reply-To: <20180721101903.bf7eac1aaf824d013fc507ce@nifty.ne.jp>
X-IsSubscribed: yes

Am 21.07.2018 um 03:19 schrieb Takashi Yano:
> On Fri, 20 Jul 2018 15:35:21 +0200
> João Eiras wrote:
>> #include <fcntl.h>
>> #include <stdio.h>
>> int main () {
>> int fd = open("/dev/stdout", O_WRONLY);
>> printf("Opened stdout: %d\n", fd);
>> return 0;
>> }
>>
>> Unfortunately, this freezes. The problem (I think) is because
>> /dev/stdout is a pipe, so the open() call waits forever until a
>> reader() opens /dev/stdout, which in this case should be the terminal.
> 
> I can't reporduce your problem.
> 
> The test case outputs:
> Opened stdout: 3
> 

same here.
$ ./prova.exe
Opened stdout: 3

João, what exacly is your enviroment and terminal ?


---
Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft.
https://www.avast.com/antivirus


--
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

- Raw text -


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