delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/05/04/04:34:31

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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
X-VirusChecked: Checked
X-Env-Sender: jan DOT just DOT keijser AT logicacmg DOT com
X-Msg-Ref: server-10.tower-36.messagelabs.com!1115195643!15893210!1
X-StarScan-Version: 5.4.15; banners=logicacmg.com,-,-
Message-ID: <D1D50F9C5151D2119FF000104BB3F9B708E1B759@NL-ROT-MAIL02>
From: Jan Just Keijser <jan DOT just DOT keijser AT logicacmg DOT com>
To: "'cygwin AT cygwin DOT com'" <cygwin AT cygwin DOT com>
Subject: RE: echo "$(echo '\r')" oddity
Date: Wed, 4 May 2005 10:32:13 +0200
MIME-Version: 1.0
X-OriginalArrivalTime: 04 May 2005 08:27:32.0406 (UTC) FILETIME=[1DFE2560:01C55083]
X-IsSubscribed: yes

socat (http://www.dest-unreach.org/socat/) is a multi-purpose relay tool
that can be used to connect sockets to pipes and vice versa, or terminal
pty's to TCP sockets etc etc. I have found it a very handy tool to build
VPN-like things in a environment where you cannot or do not want to modify
the existing networking infrastructure. 

The socat code comes with a test script for testing socat functionality.
Prior to upgrading to cygwin 1.5.16 almost all socat options were functional
under cygwin, except for a few that used the 'exec:'parameter. An example of
a command that is failing is:
  ./socat -t 0.1 exec:'openssl s_server -accept 12002 -quiet -cert
testsrv.pem' pipe &
  echo hallo | ./socat -t0.1  - openssl:localhost:12002,verify=0 

this command runs fine on Linux but under Cygwin there is no output echoed
back from the openssl s_server application. More specifically, the socat
server process (first line) does return the output but it looks like the
output never reaches the client - to me, that sounds like a pipe flushing
problem or a line-termination problem. 

the command that I reported yesterday:
  echo "$(echo '\r')"
is now working under a newly-compiled version of bash 3.0 in which I
commented out the offending section in subst.c.

An interesting note is that after I upgraded to cygwin 1.5.16 (from 1.5.14)
yesterday) a few other options ALSO stopped working. I am not sure what has
caused this.

regards,

JJ Keijser

> -----Original Message-----
> From: cygwin-owner AT cygwin DOT com 
> [mailto:cygwin-owner AT cygwin DOT com] On Behalf Of Brian Dessent
> Sent: Tuesday, May 03, 2005 17:54
> To: 'cygwin AT cygwin DOT com'
> Subject: Re: echo "$(echo '\r')" oddity
> 
> Jan Just Keijser wrote:
> 
> > thx for the quick answer. Lemme guess: I am going to have 
> to build my 
> > own version of bash that does not have this behaviour... 
> what is going 
> > to break if I undo this patch from the bash source code?
> > 
> > It's a shame though, coz this seems to be the only issue that stops 
> > that nifty socat from working... all tests pass except those tests 
> > that use `` or
> > $() ...
> 
> My guess is that that patch was added so that command 
> substitution on windows programs works.  Or something to that 
> effect.  You could certainly recompile without it, and see 
> what happens.
> 
> But the question that I think we're left with is what exactly 
> is socat doing that is broken by this?  If you give examples 
> I'm sure someone here will be able to show you a way to do 
> what you want without patching anything.  Note: I have no 
> idea what socat is...
> 
> Brian
> 
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Problem reports:       http://cygwin.com/problems.html
> Documentation:         http://cygwin.com/docs.html
> FAQ:                   http://cygwin.com/faq/
> 

This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.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