Freeze opening /dev/stdout

Marco Atzeri marco.atzeri@gmail.com
Sat Jul 21 11:30:00 GMT 2018


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



More information about the Cygwin mailing list