Re: to use dup() in cygwin

2003-02-24 Thread Fernando . Frutos . Martin
>Did you try to > >- look if you get the expected file descriptor from dup? >- look which errno you get? >- run the application under strace? >- run the application under gdb? > >After that and if you found that the problem is actually a Cygwin >problem, please write a *short* testcase which allows

Re: to use dup() in cygwin

2003-02-24 Thread Fernando . Frutos . Martin
[EMAIL PROTECTED] wrote: > /*close the display exit and send it to the socket*/ > close(1); > iError=dup(iDescSock); Shouldn't you be using dup2() for this? It's time to step into the 1990s here, methinks.. -- Shankar. I use dup2 and it happens the same. -- Unsubscribe info: http

Re: to use dup() in cygwin

2003-02-21 Thread Andrew DeFaria
Shankar Unni wrote: [EMAIL PROTECTED] wrote: /*close the display exit and send it to the socket*/ close(1); iError=dup(iDescSock); Shouldn't you be using dup2() for this? It's time to step into the 1990s here, methinks.. You mean we have to step out of the 20th century and into the

Re: to use dup() in cygwin

2003-02-21 Thread Shankar Unni
[EMAIL PROTECTED] wrote: /*close the display exit and send it to the socket*/ close(1); iError=dup(iDescSock); Shouldn't you be using dup2() for this? It's time to step into the 1990s here, methinks.. -- Shankar. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug

Re: to use dup() in cygwin

2003-02-21 Thread Corinna Vinschen
On Fri, Feb 21, 2003 at 10:01:17AM +0100, [EMAIL PROTECTED] wrote: > Hi! and sorry my english, > I've a server in Linux and Unix and it works perfectly, but when I compile > the same code in Cygwin, it doesn`t send the data to the socket, I use the > dup() comand. > this is part of the program wh