Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Delivered-To: mailing list cygwin@cygwin.com To: cygwin@cygwin.com Subject: to use dup() in cygwin MIME-Version: 1.0 Message-ID: From: Fernando.Frutos.Martin@es.jazztel.com Date: Fri, 21 Feb 2003 10:01:17 +0100 Content-Type: text/plain; charset="us-ascii" 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); } what have I to do this in cygwin and it works. Thank you. Fernando -- 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/