RE: Can't create Bash here document. (FIXED)

2004-11-18 Thread YorkshireSkier
>What does this display:
>$ mount -m
>
>I suspect that you need:
>$ mount -fsb "$TEMP" "/tmp"

>/Hannu E K Nevalainen, B.Sc. EE Microcomputer systems--72-->
>

Well I won't pretend to understand what's going on here. I forgot to
mention in my original email that the directory '/tmp' exists and is
writeable: 'touch /tmp/fred' works perfectly. Moreover, if I use
'mount -m' the output is the same as on my machines where I have no
problems.

However, I tried your suggested mount command and "Bingo!" the problem
is solved (or at least it appears to be!). So, I thank you for taking the
trouble to reply and for your suggestion.

Cheers,

Simon

-- 
Simon 


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



RE: scp exits often with -1

2004-11-18 Thread Jörg Schaible
Dave Korn wrote on Wednesday, November 17, 2004 7:20 PM:

[snip]

>   So basically what you've done is say to yourself "I'll just
> send tons and tons of stuff (which I know will be of no use
> or interest to 99.9% of the recipients) to absolutely
> everyone in the hopes that it might be relevant to even just
> one or two people."
> 
>   That's the same approach that spammers take.  It's just plain wrong.

Well, this *is* the list for reporting problems with Cygwin. Sorry, that I 
missed among all the other 450 mail per month, the one Chris stated, that he 
don't want straces sent to list without further asking.

Look, if I'd only sent a mail to the list stating that scp is sometimes failing 
without further information, you'd only reply with a link anyway. So I did my 
best to find at least a case to repeat the problem in a simpler environment and 
sent all information I can provide. Just stop your uber-teacher mode for a 
moment. What actions would *you* take to isolate the problem in a better way? 
What other useful information shall I provide to enable Chris or Pierre or 
someone else to have a critical look at the recent changes in the relevant 
fork()/pipe code?

>   However we're getting way OT

It's you, who always snip the informational part.

>, so if you want to discuss
> this further, I'm going to have to ask you to step outside.
> While flapping your arms and clucking like a chicken. 

>>   Sure.  How about 200k of unintelligible gibberish?  I'm
>> sure we'd all _love_ to see it.

> TITTTL!

No. Have better ways to waste my time. We don't seem to have common ground for 
standard communication anyway. My questions are still technical and on-topic.

- Jörg

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



Re: Perl-tk?

2004-11-18 Thread Reini Urban
Brian Dessent schrieb:
dwycoff wrote:
I tried using a perl-tk script in cygwin that I wrote more than
a year ago.  Whenever I run it it dies at:
 Can't locate Tk.pm in @INC (@INC contains: /usr/lib/perl5/5...
I did a search and couldn't find Tk.pm.  So I looked to the cygwin
website, but didn't find any mention of it there, either.
Has perl-tk made it to cygwin?
nope.
Perl modules are installed from CPAN, not through Cygwin setup (with the
exception of libwin32 which does not compile without patches.)  Have you
tried installing the module with CPAN?
Tk is also known not to work OOTB.
--
Fear not those who argue but those who dodge. (Marie Ebner von 
Eschenbach, Aphorisms, 1905)

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


Re: How do you resolve this?

2004-11-18 Thread Jason Tishler
Yuri,

Please post instead of sending private email.

On Thu, Nov 18, 2004 at 12:00:41AM -0700, Yuri Tijerino wrote:
> I am having exactly the same problem described in this post.  I see
> that you diagnosed the problem as something to do with a symlink.  But
> how do you resolve the problem?

There are two (main) approaches:

1. Run python from bash (or another Cygwin process):

$ python -V
Python 2.3.4

Note nothing special needs to be done to resolve the symlink.

2. Run python from the Win32 process (e.g., cmd) via sh:

C:\>sh -c "python -V"
Python 2.3.4

> Thanks for your help,

You are welcome.

>   * From: Jason Tishler
>   * To: cygwin at cygwin dot com
>   * Date: Thu, 01 May 2003 08:49:26 -0400
>   * Subject: Re: 1.3.22+, Python, NTVDM illegal instruction
>   * References: <[EMAIL PROTECTED]>
> 
> --
> 
> On Wed, Apr 30, 2003 at 05:19:24PM -0400, Rolf Campbell wrote:
> > When I run python directly from a non-cygwin program (I think any
> > non-cygwin app.  I've tried cmd.exe & explorer.exe & NTemacs), I get
> > this:
> > 
> > Title: 16 bit MS-DOS Subsystem
> > C:\CYGWIN\BIN\python.exe
> > The NTVDM CPU has encountered an illegal instruction.
> > CS:06cd IP:210f OP:63 69 66 69 65  Choose 'Close' to terminate the 
> > application.
> 
> The above is due to python being a symlink:
> 
> $ ls -l /usr/bin/python
> lrwxrwxrwx1 Administ Domain U   24 Mar 18 15:47 /usr/bin/python 
> -> python2.2.exe

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6

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



Re: Perl-tk?

2004-11-18 Thread Charles Plager
Brian Dessent schrieb:
dwycoff wrote:
I tried using a perl-tk script in cygwin that I wrote more than
a year ago.  Whenever I run it it dies at:
Can't locate Tk.pm in @INC (@INC contains: /usr/lib/perl5/5...
I did a search and couldn't find Tk.pm.  So I looked to the cygwin
website, but didn't find any mention of it there, either.
Has perl-tk made it to cygwin? 

nope.
Perl modules are installed from CPAN, not through Cygwin setup (with the
exception of libwin32 which does not compile without patches.)  Have you
tried installing the module with CPAN?
Tk is also known not to work OOTB.
I have successfully built perl Tk 800.024 (with Gerrit's help) for X 
windows.
I haven't tried later versions of Tk or the windows native version.

(Gerrit says this is no longer necessary with perl-5.8.5 for Cygwin, but I
haven't verified this)
0) Get a copy of Tk-800.024.tar.gz from the web
1) cd /usr/X11R6/lib
2) ln -s libX11.dll.a libX11.a
3) cd ~/mybuildarea
4) tar xzf Tk-800.024.tar.gz
5) cd Tk800.024/
6) less README.cygwin
7) perl Makefile.PL x
8) make && make test && make install
Charles
--
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/


Re: scp exits often with -1

2004-11-18 Thread Christopher Faylor
On Thu, Nov 18, 2004 at 09:15:49AM +0100, J?rg Schaible wrote:
>Dave Korn wrote on Wednesday, November 17, 2004 7:20 PM:
>>So basically what you've done is say to yourself "I'll just send tons
>>and tons of stuff (which I know will be of no use or interest to 99.9%
>>of the recipients) to absolutely everyone in the hopes that it might be
>>relevant to even just one or two people."
>>
>>That's the same approach that spammers take.  It's just plain wrong.
>
>Well, this *is* the list for reporting problems with Cygwin.  Sorry,
>that I missed among all the other 450 mail per month, the one Chris
>stated, that he don't want straces sent to list without further asking.

My reason for stating this is that the majority of people who send strace
output snip the wrong part.  Often people snip something that they think
shows a problem and send that lines and the next hundred lines.  It turns
out to be wasted bandwidth.

strace is a tool for people who are willing to look at source code.  Sending
megabytes of an unsolicited strace before someone has indicated that they
are willing to help is usually pointless.

FWIW, I ran scp in a loop sending a large file to a system on my local
network and to sourceware.org for hours a couple of days ago without
problems.

If this is a problem with the new pipe code then maybe Bob Byrnes could
offer some insight.

cgf

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



Re: scp exits often with -1

2004-11-18 Thread Bob Byrnes
> If this is a problem with the new pipe code then maybe Bob Byrnes could
> offer some insight.

Offhand, I can't think of any way that the new pipe stuff could cause
this behavior, but I'll add this to my list of (potential) pipe-related
things to investigate and think about.

We use scp with the new pipe code heavily here, and we haven't seen any
such failures.  It's going to be harder to investigate if we can't
reproduce the failure, obviously, but sometimes life is hard ... :-(

--
Bob

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



Re: long command executed via a variable fails (SOLVED)

2004-11-18 Thread Geoffrey KRETZ
Thx to Igor and Reini for their help. My shell script works on UNIX and 
windows via Cygwin now.
The good syntax is the one given by Igor : if ! eval "$cmd"; then .

Geoffrey
Geoffrey KRETZ wrote:
Actually my original unix script use :
if ! $cmd; then
...
fi
AND
if ! eval $cmd; then
...
fi
And it works perfectly
I'm forced to use eval because I'm of the structure of my $cmd variable.
Just a few samples :
- cmd="$LDPRELOAD $FGLRUN ${mainname}.42r -db $dbname -dt $dbtype -ho 
$QAHOST $dvmversionopt -dc $dbcode -dynamic -tn 99",
with LDPRELOAD = "LD_PRELOAD='$FGLDIR/bin/dbmdb28x.so'" and $FGLRUN is 
a runner use to run an executable
- cmd ="$COMPILATOR fglmksdl -d $dbcode $mksdlopt"
with $COMPILATOR = "INFORMIXC='$FGLCC -shared'", $FGLCC is a 
compilator with some option (ie: gcc -mlp64 or cc -Wl,-G,-dy) and 
fglmksdl a (my company) command that generate shared libraries.

I've got to use carefully the quotes and double-quotes and without 
eval, I doesn't work on Unix.

Whatever, I'll try : eval "$cmd" and read the sh man page ;)
Geo
Igor Pechtchanski wrote:
On Wed, 17 Nov 2004, Reini Urban wrote:
 

Geoffrey KRETZ schrieb:
  

I've got a problem with a shell script used with Cygwin 1.5.10-3 on 
W2000
SP4 and W XP SP 2.

The following part of code works on all the Unix I've tested 
(HP-UX/AIX/Sun
Solaris/Linux).

With Cygwin,  it doesn't :(
*Code:*
cmd="long shell command with differents parameters"
if [ ! eval $cmd ]; then
echo "Error : $cmd"
exit 1
fi


This doesn't do what you thought it would.  Please read the sh manual on
the "if" builtin command.  You're actually invoking the "[" command with
the parameters "! eval $cmd", which is not what you want.
 

instead of eval $cmd, i've tried :
- `eval $cmd`
- eval `$cmd`
- $cmd
- `$cmd`


Most of the above (except $cmd) show that you don't understand much 
about
command substitution.  Please read the sh man page carefully.

BTW, given that sh's "eval" behaves differently from bash's, you should
actually use 'eval "$cmd"' (note the double quotes).
 

I've also try with a function without more success.
*Code:*
execCmd()
{
eval $cmd
return $?
}
cmd="long shell command with differents parameters"
if [ ! execCmd ]; then
echo "Error : $cmd"
exit 1
fi


This doesn't work since $cmd is unset in the function.  Either define 
the
function after setting cmd, or pass $cmd as a parameter, e.g.,

execCmd() {
 cmd="$1"; shift
 eval "$cmd"
 return $?
}
BTW, your "if" test suffers from the same problem as your original one.
Ditch the "[".."]".
 

The only way I've find is :
*Code:*
cmd="long shell command with differents parameters"
eval $cmd
if [ $? -ne 0 ]; then
echo "Error : $cmd"
exit 1
fi


Note that this works because you're actually using "[".."]" in the right
way here.
 

Is it possible to make it work like the two first exemple or I'm
obliged to use the third solution ?

FAQ: http://cygwin.com/faq/faq_3.html#SEC43
cygwin's /bin/sh is ash, on most other platforms it is /bin/bash.
If you want it to behave it exactly like on other platforms, and you 
use
bash specific constructs, use the /bin/bash shebang.
  

Well, eval is not a bash-specific construct.  It does behave slightly
differently in ash than in bash, but in this particular case, 
switching to
bash wouldn't have helped the OP.  Reading the man pages for bash and sh
would have. :-)
HTH,
Igor
 


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

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


Re: scp exits often with -1

2004-11-18 Thread Pierre A. Humblet
On Thu, Nov 18, 2004 at 12:27:29PM -0500, Bob Byrnes wrote:
> > If this is a problem with the new pipe code then maybe Bob Byrnes could
> > offer some insight.
> 
> Offhand, I can't think of any way that the new pipe stuff could cause
> this behavior, but I'll add this to my list of (potential) pipe-related
> things to investigate and think about.

>From what I can see the failure is related to pipes:

   41  673146 [main] ssh 4392 cygwin_select: 7, 0x100EEBF8, 0x100EEB70, 0x0, 0x0
   65  673211 [main] ssh 4392 dtable::select_read:  fd 3
  662  673873 [main] ssh 4392 dtable::select_read:  fd 4
   33  673906 [main] ssh 4392 cygwin_select: to NULL, ms 
   34  673940 [main] ssh 4392 cygwin_select: sel.always_ready 0
  307  674247 [main] ssh 4392 start_thread_socket: Handle 0x634
   33  674280 [main] ssh 4392 start_thread_socket: Added to readfds
   34  674314 [main] ssh 4392 start_thread_socket: exitsock 0x620
   33  674347 [main] ssh 4392 start_thread_socket: stuff_start 0x22EBE4
   98  674445 [main] ssh 4392 select_stuff::wait: m 3, ms 4294967295
   43  674488 [select_socket] ssh 4392 thread_socket: stuff_start 0x101196BC
   71  674559 [select_pipe] ssh 4392 peek_pipe: , PeekNamedPipe failed, Win32 
error 109

109 is "The pipe has been ended". Isn't that strange when reading a pipe? 
Unfortunately fd 4 was opened in a part of the trace that we don't have.
Sending a url to the full trace is more useful (and less controversial)
than sending parts.

Pierre

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



login shell in passwd ignored

2004-11-18 Thread kynn




I have changed the login shell info for my username in /etc/passwd
from /bin/bash to /usr/bin/zsh, and when I login, the SHELL
environment variable reflects this change, but even after restarting
the machine, my login shell is still /bin/bash.

What must I do to have /usr/bin/zsh be the default shell?

Thanks!

kj


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



Executing ssh from perl

2004-11-18 Thread Stephen Studley
Apologies in advance if this a well covered issue, as I'm pretty sure 
it has been. I did look through the lists email archive and found too 
many variations on similar issues to be helpful.

Problem: ssh command hangs when executed from perl script using back-tics.
The same command (no back-tics) works as expected from Windows cmd 
shell and cygwin terminal.

I need to capture the return results from the command. i.e.
my $str = `ssh @machine ls `;
In looking at the debug output, I simply never get a response from 
the remote machine. The last line in the problem scenario is:
debug3: channel 0: will not send data after close

The successful scenario simply returns the expect stdout:
debug3: channel 0: will not send data after close
/
Thanks in advance.
Stephen
--
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/


RE: Can't create Bash here document. (FIXED)

2004-11-18 Thread Hannu E K Nevalainen
you (YorkshireSkier BLOB aol.com) wrote :

I wrote:
>> What does this display:
>> $ mount -m
>>
>> I suspect that you need:
>> $ mount -fsb "$TEMP" "/tmp"
>
> Well I won't pretend to understand what's going on here. I forgot to
> mention in my original email that the directory '/tmp' exists and is
> writeable: 'touch /tmp/fred' works perfectly.

 Did you have a "/tmp" entry in the "mount -m" output?
I guess that you didn't; that might have been the cause to your problem.

> Moreover, if I use
> 'mount -m' the output is the same as on my machines where I have no
> problems.

 Any /tmp there?

> However, I tried your suggested mount command and "Bingo!" the problem
> is solved (or at least it appears to be!). So, I thank you for taking
> the trouble to reply and for your suggestion.

 To me this indicates that I was right above.

There is a subtle difference between a /tmp *directory* and a /tmp *mount
entry*.
Because I'm lazy and just "know", I'll leave to others to explain.
(Resarch on the matter; begin with finding out what the mount table and
mount command does on Linux/BSD)

/Hannu E K Nevalainen, B.Sc. EE Microcomputer systems--72-->

** mailing list preference; please keep replies on list **

-- printf("LocalTime: UTC+%02d\n",(DST)? 2:1); --
--END OF MESSAGE--


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



Re: Executing ssh from perl

2004-11-18 Thread Igor Pechtchanski
On Thu, 18 Nov 2004, Stephen Studley wrote:

> Apologies in advance if this a well covered issue, as I'm pretty sure it has
> been. I did look through the lists email archive and found too many variations
> on similar issues to be helpful.
>
> Problem: ssh command hangs when executed from perl script using back-tics.
>
> The same command (no back-tics) works as expected from Windows cmd shell and
> cygwin terminal.
>
> I need to capture the return results from the command. i.e.
> my $str = `ssh @machine ls `;
>
> In looking at the debug output, I simply never get a response from the remote
> machine. The last line in the problem scenario is:
> debug3: channel 0: will not send data after close
>
> The successful scenario simply returns the expect stdout:
> debug3: channel 0: will not send data after close
> /
>
> Thanks in advance.
>
> Stephen

Try giving the "-n" argument to ssh.
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
 |,4-  ) )-,_. ,\ (  `'-'   Igor Pechtchanski, Ph.D.
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse..." -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT

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



RE: Perl-tk?

2004-11-18 Thread Bruce Dobrin
I've been using the tk800 native windows functionality for years with
cygwin.  You just have to recompile/install with each perl change. If I
remember correctly, with the most recent cygwin/perl/tk800.024, I
haven't even had to patch it.  The big headache is that you need to play
games with rebase to get IO and Menubutton to work correctly.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Charles Plager
Sent: Thursday, November 18, 2004 5:39 AM
To: Cygwin Mailing list
Subject: Re: Perl-tk?

> Brian Dessent schrieb:
> 
>> dwycoff wrote:
>> 
>> I tried using a perl-tk script in cygwin that I wrote more than a 
>> year ago.  Whenever I run it it dies at:
>> 
>> 
>> Can't locate Tk.pm in @INC (@INC contains:
/usr/lib/perl5/5...
>> 
>> I did a search and couldn't find Tk.pm.  So I looked to the cygwin 
>> website, but didn't find any mention of it there, either.
>> 
>> 
>> Has perl-tk made it to cygwin? 
>> 
> 
> nope.
> 
> Perl modules are installed from CPAN, not through Cygwin setup (with 
> the exception of libwin32 which does not compile without patches.)  
> Have you tried installing the module with CPAN?
> 
> 
> Tk is also known not to work OOTB.

I have successfully built perl Tk 800.024 (with Gerrit's help) for X
windows.
I haven't tried later versions of Tk or the windows native version.


(Gerrit says this is no longer necessary with perl-5.8.5 for Cygwin, but
I
haven't verified this)

0) Get a copy of Tk-800.024.tar.gz from the web
1) cd /usr/X11R6/lib
2) ln -s libX11.dll.a libX11.a
3) cd ~/mybuildarea
4) tar xzf Tk-800.024.tar.gz
5) cd Tk800.024/
6) less README.cygwin
7) perl Makefile.PL x
8) make && make test && make install

Charles


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


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



Re: login shell in passwd ignored

2004-11-18 Thread Igor Pechtchanski
On Thu, 18 Nov 2004, kynn wrote:

> I have changed the login shell info for my username in /etc/passwd
> from /bin/bash to /usr/bin/zsh, and when I login, the SHELL
> environment variable reflects this change, but even after restarting
> the machine, my login shell is still /bin/bash.
>
> What must I do to have /usr/bin/zsh be the default shell?

What exactly do you mean by "login"?  If you connect to your machine
remotely via inetd or sshd, the /etc/passwd entry should be honored.  If
you mean "clicking on the Cygwin icon", that launches the batch file
/Cygwin.bat, which has the shell (bash) hard-coded in it.  If you want it
to launch a different shell, simply edit the batch file.
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
 |,4-  ) )-,_. ,\ (  `'-'   Igor Pechtchanski, Ph.D.
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse..." -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT

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



Re: Executing ssh from perl

2004-11-18 Thread Stephen Studley
At 2:12 PM -0500 11/18/04, Igor Pechtchanski wrote:
On Thu, 18 Nov 2004, Stephen Studley wrote:
 > The successful scenario simply returns the expect stdout:
 debug3: channel 0: will not send data after close
 /
 Thanks in advance.
 Stephen
Try giving the "-n" argument to ssh.
unfortunately, no change in my results.
BTW: I have ssh configured for passwordless connection.
--
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/


Re: scp exits often with -1

2004-11-18 Thread Jörg Schaible
Christopher Faylor wrote:

> On Thu, Nov 18, 2004 at 09:15:49AM +0100, J?rg Schaible wrote:
[snip]
>>Well, this *is* the list for reporting problems with Cygwin.  Sorry,
>>that I missed among all the other 450 mail per month, the one Chris
>>stated, that he don't want straces sent to list without further asking.
> 
> My reason for stating this is that the majority of people who send strace
> output snip the wrong part.  Often people snip something that they think
> shows a problem and send that lines and the next hundred lines.  It turns
> out to be wasted bandwidth.

That's the reason, why I just sent the first part, where the initialization
of all the pipes and forked processes can be seen and the last part, when
scp is shutting down the processes again. I think the middle part,
observing scp looking into the private keys and sending the file, is quite
useless for this problem.

> strace is a tool for people who are willing to look at source code. 
> Sending megabytes of an unsolicited strace before someone has indicated
> that they are willing to help is usually pointless.

Yeah, understand that.

> FWIW, I ran scp in a loop sending a large file to a system on my local
> network and to sourceware.org for hours a couple of days ago without
> problems.

Since I call from Java always "strace -o /tmp/scp.strace scp" I don't have
the problem also. It's slow, but works. Too weird :(
At least I could reproduce it without Java also. FWIW.

> If this is a problem with the new pipe code then maybe Bob Byrnes could
> offer some insight.

As said, I'll take any further action to isolate it. Would you expect a
difference using the current snapshot?

- Jörg


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



Re: scp exits often with -1

2004-11-18 Thread Jörg Schaible
Pierre A. Humblet wrote:

> On Thu, Nov 18, 2004 at 12:27:29PM -0500, Bob Byrnes wrote:
>> > If this is a problem with the new pipe code then maybe Bob Byrnes could
>> > offer some insight.
>> 
>> Offhand, I can't think of any way that the new pipe stuff could cause
>> this behavior, but I'll add this to my list of (potential) pipe-related
>> things to investigate and think about.
> 
> From what I can see the failure is related to pipes:
> 
>41  673146 [main] ssh 4392 cygwin_select: 7, 0x100EEBF8, 0x100EEB70,
>0x0, 0x0
>65  673211 [main] ssh 4392 dtable::select_read:  fd 3
>   662  673873 [main] ssh 4392 dtable::select_read:  fd 4
>33  673906 [main] ssh 4392 cygwin_select: to NULL, ms 
>34  673940 [main] ssh 4392 cygwin_select: sel.always_ready 0
>   307  674247 [main] ssh 4392 start_thread_socket: Handle 0x634
>33  674280 [main] ssh 4392 start_thread_socket: Added to readfds
>34  674314 [main] ssh 4392 start_thread_socket: exitsock 0x620
>33  674347 [main] ssh 4392 start_thread_socket: stuff_start 0x22EBE4
>98  674445 [main] ssh 4392 select_stuff::wait: m 3, ms 4294967295
>43  674488 [select_socket] ssh 4392 thread_socket: stuff_start
>0x101196BC
>71  674559 [select_pipe] ssh 4392 peek_pipe: , PeekNamedPipe failed,
>Win32 error 109
> 
> 109 is "The pipe has been ended". Isn't that strange when reading a pipe?
> Unfortunately fd 4 was opened in a part of the trace that we don't have.

I'll have a look tomorrow in the office, where fd 4 came from (thought I
posted all related stuff, but trace is hard). Still have the full protocol
though.

> Sending a url to the full trace is more useful (and less controversial)
> than sending parts.

You're right. Will try to find a place online tomorrow.

- Jörg


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



Re: scp exits often with -1

2004-11-18 Thread Christopher Faylor
On Thu, Nov 18, 2004 at 09:00:38PM +0100, J?rg Schaible wrote:
>I'll have a look tomorrow in the office, where fd 4 came from (thought I
>posted all related stuff, but trace is hard).

Which is why unsolicited traces are almost always useless.

cgf

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



Re: scp exits often with -1

2004-11-18 Thread Christopher Faylor
On Thu, Nov 18, 2004 at 08:57:15PM +0100, J?rg Schaible wrote:
>> If this is a problem with the new pipe code then maybe Bob Byrnes could
>> offer some insight.
>
>As said, I'll take any further action to isolate it. Would you expect a
>difference using the current snapshot?

No.

cgf

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



Re: Executing ssh from perl

2004-11-18 Thread Igor Pechtchanski
On Thu, 18 Nov 2004, Stephen Studley wrote:

> At 2:12 PM -0500 11/18/04, Igor Pechtchanski wrote:
> > On Thu, 18 Nov 2004, Stephen Studley wrote:
> >  > The successful scenario simply returns the expect stdout:
> > >  debug3: channel 0: will not send data after close
> > >  /
> > >
> > >  Thanks in advance.
> > >
> > >  Stephen
> >
> > Try giving the "-n" argument to ssh.
>
> unfortunately, no change in my results.
> BTW: I have ssh configured for passwordless connection.

You *did* properly escape the command string, right?  Otherwise,

my $str = `ssh -n [EMAIL PROTECTED] ls`;

will try to interpolate the contents of the array @machine into the
command...  You need to use

my $str = `ssh -n [EMAIL PROTECTED] ls`;

BTW, the -n flag is still useful, since some commands don't properly run
otherwise.
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
 |,4-  ) )-,_. ,\ (  `'-'   Igor Pechtchanski, Ph.D.
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse..." -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT

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



Re: Executing ssh from perl

2004-11-18 Thread Stephen Studley
At 3:39 PM -0500 11/18/04, Igor Pechtchanski wrote:
 > unfortunately, no change in my results.
 BTW: I have ssh configured for passwordless connection.
You *did* properly escape the command string, right?  Otherwise,
my $str = `ssh -n [EMAIL PROTECTED] ls`;
will try to interpolate the contents of the array @machine into the
command...  You need to use
my $str = `ssh -n [EMAIL PROTECTED] ls`;
BTW, the -n flag is still useful, since some commands don't properly run
otherwise.
yep, everything is escaped as needed. I know that by looking at the 
debug output:
debug1: Sending command: ls 

I've also printed the command to stdout and pasted it into a windows 
cmd shell and cygwin terminal with success.

If I use system(""); instead of ``;, the command returns 0, 
(no hang).  Unfortunately system wont work for my needs, as it is 
critical I evaluate stdout:stderr.

I do appreciate your help.
Stephen
--
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/


tclsh

2004-11-18 Thread Crescioli, Phil
Can someone please tell me what cygwin package tclsh lives in?
Thanks,
Phil


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



Re: Executing ssh from perl

2004-11-18 Thread Igor Pechtchanski
On Thu, 18 Nov 2004, Stephen Studley wrote:

> At 3:39 PM -0500 11/18/04, Igor Pechtchanski wrote:
> >  > unfortunately, no change in my results.
> > >  BTW: I have ssh configured for passwordless connection.
> >
> > You *did* properly escape the command string, right?  Otherwise,
> >
> > my $str = `ssh -n [EMAIL PROTECTED] ls`;
> >
> > will try to interpolate the contents of the array @machine into the
> > command...  You need to use
> >
> > my $str = `ssh -n [EMAIL PROTECTED] ls`;
> >
> > BTW, the -n flag is still useful, since some commands don't properly run
> > otherwise.
>
> yep, everything is escaped as needed. I know that by looking at the debug
> output:
> debug1: Sending command: ls 
>
> I've also printed the command to stdout and pasted it into a windows cmd shell
> and cygwin terminal with success.
>
> If I use system(""); instead of ``;, the command returns 0, (no
> hang).  Unfortunately system wont work for my needs, as it is critical I
> evaluate stdout:stderr.
>
> I do appreciate your help.
> Stephen

I suppose the next step is to try to reproduce this in a command-line perl
invocation, e.g., something like

perl -we 'my $str=`ssh -n [EMAIL PROTECTED] ls`;print "[$str]\n"'

and see what messages that produces.  I assume it's working for you from a
Linux machine...  Also, I don't believe you've said anything about your
system configuration -- please review 
and provide the requested information.
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
 |,4-  ) )-,_. ,\ (  `'-'   Igor Pechtchanski, Ph.D.
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse..." -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT

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



Re: tclsh

2004-11-18 Thread Igor Pechtchanski
On Thu, 18 Nov 2004, Crescioli, Phil wrote:

> Can someone please tell me what cygwin package tclsh lives in?

The standard answer for questions of this type:
.  FWIW, if you're searching for a program,
it helps to prepend "bin/" to the search string, i.e., try searching for
"bin/tclsh".
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
 |,4-  ) )-,_. ,\ (  `'-'   Igor Pechtchanski, Ph.D.
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse..." -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT

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



Re: scp exits often with -1

2004-11-18 Thread Jörg Schaible
Christopher Faylor wrote:

> On Thu, Nov 18, 2004 at 09:00:38PM +0100, J?rg Schaible wrote:
>>I'll have a look tomorrow in the office, where fd 4 came from (thought I
>>posted all related stuff, but trace is hard).
> 
> Which is why unsolicited traces are almost always useless.



Point taken.

- Jörg


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



Re: Executing ssh from perl

2004-11-18 Thread Stephen Studley
At 4:30 PM -0500 11/18/04, Igor Pechtchanski wrote:
On Thu, 18 Nov 2004, Stephen Studley wrote:
 > At 3:39 PM -0500 11/18/04, Igor Pechtchanski wrote:
I suppose the next step is to try to reproduce this in a command-line perl
invocation, e.g., something like
perl -we 'my $str=`ssh -n [EMAIL PROTECTED] ls`;print "[$str]\n"'
good idea, however same results, at least from my Windows machine.
The command-line perl works fine from my OSX machine.
and see what messages that produces.  I assume it's working for you from a
Linux machine...  Also, I don't believe you've said anything about your
system configuration -- please review 
and provide the requested information.
The machine I'm ssh'ing from is a new Dell PWS 650, Windows XP Pro, 
Version 2002, Service Pack 2. (the sp2 firewall is disabled) I've 
installed the latest Cygwin env.

The remote machines are not quite as new with regard to hardware, 
they are however, running the same OS and cygwin.

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


Re: Perl-tk?

2004-11-18 Thread Yitzchak Scott-Thoennes
On Thu, Nov 18, 2004 at 11:17:37AM -0800, Bruce Dobrin wrote:
> I've been using the tk800 native windows functionality for years with
> cygwin.  You just have to recompile/install with each perl change. If I
> remember correctly, with the most recent cygwin/perl/tk800.024, I
> haven't even had to patch it.  The big headache is that you need to play
> games with rebase to get IO and Menubutton to work correctly.

> Charles Plager wrote:
> 
> 0) Get a copy of Tk-800.024.tar.gz from the web
> 1) cd /usr/X11R6/lib
> 2) ln -s libX11.dll.a libX11.a
> 3) cd ~/mybuildarea
> 4) tar xzf Tk-800.024.tar.gz
> 5) cd Tk800.024/
> 6) less README.cygwin
> 7) perl Makefile.PL x
> 8) make && make test && make install

To clarify, using "perl Makefile.PL x" builds an X windows Perl/Tk.
Without the x, it builds to use native windows ala the Win32 port.

IIRC, last time I've tried either I got some test failures, but a
by-and-large functional Perl/Tk.

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



Re: Executing ssh from perl

2004-11-18 Thread Yitzchak Scott-Thoennes
On Thu, Nov 18, 2004 at 12:56:19PM -0800, Stephen Studley wrote:
> If I use system(""); instead of ``;, the command returns 0, 
> (no hang).  Unfortunately system wont work for my needs, as it is 
> critical I evaluate stdout:stderr.

`` doesn't capture stderr; maybe you want IPC::Open3

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



Re: Executing ssh from perl

2004-11-18 Thread Stephen Studley
one very interesting discovery. If the command fails, it returns! It 
would appear it hangs only when the command succeeds. If I mangle the 
path to the ls command, ssh returns with file not found.

At 4:30 PM -0500 11/18/04, Igor Pechtchanski wrote:
On Thu, 18 Nov 2004, Stephen Studley wrote:
 > At 3:39 PM -0500 11/18/04, Igor Pechtchanski wrote:
I suppose the next step is to try to reproduce this in a command-line perl
invocation, e.g., something like
perl -we 'my $str=`ssh -n [EMAIL PROTECTED] ls`;print "[$str]\n"'
good idea, however same results, at least from my Windows machine.
The command-line perl works fine from my OSX machine.
and see what messages that produces.  I assume it's working for you from a
Linux machine...  Also, I don't believe you've said anything about your
system configuration -- please review 
and provide the requested information.
The machine I'm ssh'ing from is a new Dell PWS 650, Windows XP Pro, 
Version 2002, Service Pack 2. (the sp2 firewall is disabled) I've 
installed the latest Cygwin env.

The remote machines are not quite as new with regard to hardware, 
they are however, running the same OS and cygwin.

Perl is 5.8.0.810
OpenSSH is OpenSSH_3.9p1
Stephen
--
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/


Re: scp exits often with -1

2004-11-18 Thread Pierre A. Humblet
At 09:00 PM 11/18/2004 +0100, Jörg Schaible wrote:
>Pierre A. Humblet wrote:
>> 
>> 109 is "The pipe has been ended". Isn't that strange when reading a pipe?
>> Unfortunately fd 4 was opened in a part of the trace that we don't have.
>
>I'll have a look tomorrow in the office, where fd 4 came from (thought I
>posted all related stuff, but trace is hard). Still have the full protocol
>though.

I had a second look at this. It's easy to correlate the trace with the
-v outputs you provided in
http://cygwin.com/ml/cygwin/2004-11/msg00637.html   
The debug outputs correspond to lines such as "N = write (2, xxx)",
where N is the length of the debug line.

For example
   36  676149 [main] ssh 4392 writev: writev (2, 0x22A400, 1)
   34  676183 [main] ssh 4392 fhandler_base::write: binary write
   45  676228 [main] ssh 4392 fhandler_base::write: 40 = write (0x22A830, 40)
   34  676262 [main] ssh 4392 writev: 40 = write (2, 0x22A400, 1), errno 119
 debug2: channel 0: read<=0 rfd 4 len 0   <= THIS IS THE DEBUG OUTPUT
   36  676298 [main] ssh 4392 __cygwin_lock_lock: threadcount 1.  not locking

Once you know that, it's easier to follow what's going on. It would be
interesting to compare traces of successful and failed runs, in the area
where their debug outputs differ.

Pierre

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



Re: login shell in passwd ignored

2004-11-18 Thread Peter A. Castro
On Thu, 18 Nov 2004, Igor Pechtchanski wrote:

> On Thu, 18 Nov 2004, kynn wrote:
>
> > I have changed the login shell info for my username in /etc/passwd
> > from /bin/bash to /usr/bin/zsh, and when I login, the SHELL
> > environment variable reflects this change, but even after restarting
> > the machine, my login shell is still /bin/bash.
> >
> > What must I do to have /usr/bin/zsh be the default shell?
>
> What exactly do you mean by "login"?  If you connect to your machine
> remotely via inetd or sshd, the /etc/passwd entry should be honored.  If
> you mean "clicking on the Cygwin icon", that launches the batch file
> /Cygwin.bat, which has the shell (bash) hard-coded in it.  If you want it
> to launch a different shell, simply edit the batch file.

Alternatively, run the command 'mkzsh --desktop' from a bash shell and
it'll create an icon for running zsh on your desktop.

>   Igor

-- 
Peter A. Castro <[EMAIL PROTECTED]> or <[EMAIL PROTECTED]>
"Cats are just autistic Dogs" -- Dr. Tony Attwood

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