delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/02/21/12:07:21

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
Date: Fri, 21 Feb 2003 17:39:59 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: to use dup() in cygwin
Message-ID: <20030221163959.GS1403@cygbert.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <OF94455B9D DOT B708D739-ONC1256CD4 DOT 00316F66 AT madrid DOT jazztel DOT com>
Mime-Version: 1.0
In-Reply-To: <OF94455B9D.B708D739-ONC1256CD4.00316F66@madrid.jazztel.com>
User-Agent: Mutt/1.4i

On Fri, Feb 21, 2003 at 10:01:17AM +0100, Fernando DOT Frutos DOT Martin AT es DOT jazztel DOT com 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 what, I repeat, works well in linux and unix 
> (sun, HP) 
> 
> /*close the display exit and send it to the socket*/
> 
>     close(1);
>     iError=dup(iDescSock);
>     if (iError==-1)
>         {
>         return(EEXECCOM);
>         }
>     sprintf(pcComando,"EjecutarComando_VB.ksh.%s",pcNombreAux);
>     iError=system(pcComando);
>     if (iError==-1)
>         {
>         fprintf(stderr,"Error en llamada a ejecutar");
>         return(EEXECCOM);
>         }

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 to reproduce
the problem and I';ll be happy to have a look into this issue.

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin AT cygwin DOT com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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