Re: Freeze opening /dev/stdout

2018-07-21 Thread João Eiras
Thanks everyone. Turns out it's some problem with my setup that is affecting stdin and stdout. I had no idea that could happen. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe in

Re: Why is stdin always a pipe?

2018-07-20 Thread João Eiras
On 7/20/2018 11:52 AM, Brian Inglis wrote: > Are you using a terminal that does not provide a console interface? > That is a pipe; Cygwin terms look like this: > On 21 July 2018 at 02:59, Heavenly Avenger wrote: > My results match Brian Inglis', not João Eiras'. I r

Freeze opening /dev/stdout

2018-07-20 Thread João Eiras
Hi. On linux now and then I call a program passing "/dev/stdout" as output file parameter, so the data is output in the terminal. For instance, something tiny in C. #include #include int main () { int fd = open("/dev/stdout", O_WRONLY); printf("Opened stdout: %d\n", fd); return 0; } Unfortuna

Re: Why is stdin always a pipe?

2018-07-20 Thread João Eiras
>> $ [[ -p /dev/stdin ]] && echo pipe || echo nopipe >> nopipe Interesting, it's always a pipe for me. What about ls ? $ ls -l /dev/stdin prw--- 1 user None 0 Jun 4 15:54 /dev/stdin >> $ [[ -t /dev/stdin ]] && echo term || echo noterm >> noterm The '-t' operator is used with file descripto

Why is stdin always a pipe?

2018-07-20 Thread João Eiras
Hi. I'm trying to figure out the best way to detect when my program is being piped data. So far I've used in linux often "[[ -p /dev/stdin ]]". During an interactive session, /dev/stdin will be a character device, not a pipe, and if stdin is closed ( command 0<&- ) then it's nothing. But in cygw

Re: Multiple attempts at opening same pipe for writing fail

2018-06-14 Thread João Eiras
On 13 June 2018 at 17:44, Takashi Yano wrote: > Hi João, > > Is this related to https://cygwin.com/ml/cygwin/2017-03/msg00188.html ? > Hi. That seems quite likely. In my test case, I do open+close+open and the second open fails with errno.ENXIO. If I skip the close and do open+open I get the s

Multiple attempts at opening same pipe for writing fail

2018-06-06 Thread João Eiras
Howdy. I've prepared a testcase for a bug or inconsistency with linux that is affecting one of my projects. Basically I have a background process that keeps some state always running with a pipe open for reading requests. Foreground processes that try to open that pipe for writting (to send a re

Issue with resolving symlinks (realpath, readlink, etc)

2017-12-11 Thread João Eiras
Hi. Programs and functions that rely in realpath() are broken. Example: $ cd $ ln -s /var symlink $ cd symlink $ readlink -m . /var $ mkdir subfolder $ cd subfolder $ readlink -m . /home/user/symlink/subfolder # should be /var/subfolder This is the block I think is causing problems, as it breaks

Re: Cygport mailing list

2017-12-11 Thread João Eiras
Hi, is this list dead ? -- 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

Cygport mailing list

2017-10-25 Thread João Eiras
Hi. I've been recently playing a big with cygport and have some doubts. However, both the man page for cygport and the git README [1] direct the reader to both "cygwin-ports-general AT lists DOT sourceforge net" and "cygwin-apps AT cygwin DOT com". The first seems to be shut down and the second