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
>> $ [[ -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
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
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
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
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
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
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
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
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
10 matches
Mail list logo