delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/01/30/22:51:38

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
Message-ID: <401B262D.9030907@lsil.com>
Date: Fri, 30 Jan 2004 19:51:09 -0800
From: Gancho Tenev <gancho AT lsil DOT com>
Organization: LSI Logic
User-Agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.0.1) Gecko/20020920 Netscape/7.0
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Problems with tcl "exec" command and "sh" in Cygwin.
X-Scanned-By: MIMEDefang 2.39
X-IsSubscribed: yes

Hello!

I am porting some scripts to cygwin.
In unix the scripts are is working fine.
but in cygwin I have a problem using the
tcl "exec" command.

I searched the FAQ, Docs and the mailing
list but I didn't find the answer.

I have the following scripts:

script: 1.tcl
------------------------------
#!/bin/sh
# \
exec tclsh "$0" ${1+"$@"}

puts "result= [ exec 2.tcl ]"
exit
------------------------------

script: 2.tcl
------------------------------
#!/bin/sh -e
# \
exec tclsh "$0" ${1+"$@"}

puts "Hello, World!"
exit
------------------------------


* when I run on Unix:
$./1.tcl
result = Hello, World!


* when I run it in Cygwin.
$./1
couldn't execute "2.tcl": no such file or directory
    while executing
"exec 2.tcl "
    invoked from within
"puts "result= [ exec 2.tcl ]""
    (file "./1.tcl" line 5)


* To solve this instead of
    puts "result= [ exec 2.tcl ]"
I used:
    puts "result= [ exec sh 2.tcl ]"
and this was working fine.


* But 2 days ago we decided to reinstall Cygwin (latest)
and now it is hanging on "exec sh" infinitely.
It seems something has changed! We didn't do anything
special before and now while installing cygwin.

Any ideas and suggestions are greatly appreciated!
I tried to give concise description so please let me
know if I need to provide more info!

Best regards!
    Gancho.




--
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