Re: rsync over ssh hang issue understood

2006-04-29 Thread Corinna Vinschen
On Apr 29 01:53, Steven Hartland wrote:
> Steven Hartland wrote:
> >Good news this does fix the issue. I've just successfully done
> >an rsync of ~1G ( 1700 files ) with no problem at all.
> >
> >Also note that due to the existing performance issues in ssh ( I've
> >still not had chance to dig more about that sorry ) there is NO
> >noticable slowdown when comparing this version to the baseline
> >version of openssh.
> >
> >All in all this version is a massive improvement which is fantastic
> >news!!!
> 
> Dam spoke too soon. The experimental version seems to loose output
> sometimes, possibly not being flushed. Here's a reproductive sequence
> for you.
> 
> freebsd1> ssh cygwin1
> cygwin1> echo "1" > /tmp/test.txt
> cygwin1> cat /tmp/test.txt
> 1
> cygwin1> exit
> freebsd1> ssh cygwin1 "cat /tmp/test.txt"
> *** no output ***
> 
> Looks like its just not flushing the output at someone point in the
> reworked code.

I just tried it a couple of times and it works for me every time, from
Linux to Cygwin.  Maybe this time (only once), it's *not* Cygwin?


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  cygwin AT cygwin DOT com
Red Hat

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



New Mirror in Armenia

2006-04-29 Thread ---SHMEL---

we want to open a CygWin Mirror on our server in Armenia. How can we do it?

---
ArmLUG Team

--
---SHMEL---

--
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: New Mirror in Armenia

2006-04-29 Thread Brian Dessent
---SHMEL--- wrote:

> we want to open a CygWin Mirror on our server in Armenia. How can we do it?

Are you asking how to actually setup the mirror, or how to get your site
added to the official list?

If the former, then there are multiple ways to go about it, but probably
the best is rsync.

If the latter, then read the fourth paragraph of
.

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/



Re: rsync over ssh hang issue understood

2006-04-29 Thread Brett Serkez



This is really a tricky problem.  What I could do to circumvent this at
least for connections over ssh is to upload an OpenSSH test version
which uses socketpairs instead of pipes for the local connection to the
applications.  This avoids using pipes which are the culprit here,



This thread's subject line is a reply to my original posting in
December of last year:

http://www.cygwin.com/ml/cygwin/2005-12/msg01096.html

Rereading that posting, I was able to get rsync over ssh to work
reliably by changing rsync to use a pipe vs. a socketpair.  This
solution uses socketpairs instead of pipes.

I'm wondering if there are two pipes/socketpairs?  My read is that
each of the two solutions, essentially matches one to the other.  That
is changing OpenSSH to use socketpairs, matches to rsync's use of
socketpairs and visa versa.

Brett

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



SSH X11 forwarding hang work around

2006-04-29 Thread Brett Serkez

There have been several posts in regard to the ssh -X/-Y hang, with no
resolution.

A simplistic work around is to simply not use xauth.exe.  If the port
that the X server is running on (i.e. 6000 by default) is only
available via localhost, this should be reasonably secure vs.
validating individual connections.

Simply make xauth.exe unavailable with a command like:

mv /usr/X11R6/bin/xauth.exe  /usr/X11R6/bin/xauth.exe.nohang

Then forwarding works:

$ ssh -Y target
Warning: No xauth data; using fake authentication data for X11 forwarding.
Last login: Sat Apr 29 07:33:41 2006 from example
$

Brett

--
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: rsync over ssh hang issue understood

2006-04-29 Thread Steven Hartland

Corinna Vinschen wrote:

freebsd1> ssh cygwin1
cygwin1> echo "1" > /tmp/test.txt
cygwin1> cat /tmp/test.txt
1
cygwin1> exit
freebsd1> ssh cygwin1 "cat /tmp/test.txt"
*** no output ***

Looks like its just not flushing the output at someone point in the
reworked code.


I just tried it a couple of times and it works for me every time, from
Linux to Cygwin.  Maybe this time (only once), it's *not* Cygwin?


Works fine here on:
* bsd -> standard cygwin build
* bsd -> sfu
* bsd -> bsd
* bsd -> linux

So really looks like an issue with this new socketed version unfortunately.

   Steve



This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. 


In the event of misdirection, illegible or incomplete transmission please 
telephone (023) 8024 3137
or return the E.mail to [EMAIL PROTECTED]


--
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: where to find "dig" command?

2006-04-29 Thread Hiroki Sakagami

I was able to use Windows native binary on the Cygwin console.  Thank you.

On 4/29/06, Thorsten Kampe <[EMAIL PROTECTED]> wrote:

* Hiroki Sakagami (2006-04-28 16:19 +)
> Where is "dig" DNS lookup command?
> It seems that search at http://cygwin.com/packages/ has no result package.

ftp://ftp.isc.org/isc/bind/contrib


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



- LeGeNdOfHyIp -

2006-04-29 Thread new & hot & just started
new hyip paid me Referral 

plz join and paid under me :)

http://legendofhyip.com/?ref=mazika




--
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: Geomview & Cygwin setup [Attn gcc maintainer]

2006-04-29 Thread Eric Blake
Dave Korn wrote:
> > (Why #define says __CYGWIN__ and gcc -v says something else is
> > silly.) 
> 
>   No it isn't.  Your assumption that the two have to be in some way related is
> silly.  As is attempting to parse the output from "gcc -v" to detect a given
> target rather than using one of the predefined macros, which is what they are
> for and how it is supposed to be done.  The output from "gcc -v" is for
> *humans* to read, and version strings are allowed to have free-format text and
> no guarantees are provided regarding the content or formatting of that text or
> how it may or may not change in the future.

First, I agree with most of the points Dave has made - cygwin gcc is a single
package (hence -v output that uses a phrase intended to show that both
cygwin native and mingw cross-compilation is supported, and in no way
was intended to slight cygwin).  I agree that Lloyd is reading too much
into the current output of -v.  I also agree that -v is not the appropriate
way to determine what the compiler supports - on cygwin, gcc without
options will compile a cygwin native executable, and #define __CYGWIN__
to a nonzero value, while gcc with the -mno-cygwin option will cross-compile
mingw native executables, and leave __CYGWIN__ undefined.  Using the
output of -dumpmachine, or better yet, using the autoconf tradition of
compiling a test program to see what the actual compiler's behavior is
instead of relying on version strings, is more appropriate.

However, I feel that the output of gcc -v is not entirely freeform, because
part of it is also used in gcc --version.  In this recent autoconf thread,
http://lists.gnu.org/archive/html/autoconf/2006-04/msg00116.html,
it was pointed out that Debian has a similar bug where their gcc's
version output violates GNU coding standards by not ending in a
version number.  Gerritt, I would suggest that the next time you
package gcc for cygwin, that you alter the version string such that
it ends in a version number, perhaps something like:
gcc (GCC) 3.4.4 (cygwin/mingw special, gdc 0.12, dmd 0.125) 3.4.4-2

Now, as to the real question about d_ino semantics.  Cygwin versions
up to 1.5.18 declared d_ino, but were buggy in their implementation
such that d_ino sometimes disagreed with st_ino (for example, on
NTFS drives).  This bug forced me to compile cygwin coreutils as though
d_ino did not exist, since there are applications that do care about the
correct value of d_ino.  Cygwin 1.5.19 removed the declaration of d_ino
altogether, as permitted by POSIX, because of this bug.  Therefore,
if your app fails to compile when d_ino is not present, it is a bug
in your app for disobeying POSIX/SUSv3, which explicitly state that
d_ino is optional.  Cygwin 1.5.20 will introduce a patch that ensures
d_ino is always correct, at the expense of a slowdown in cases where
Windows is not helpful (mainly when dealing with a drive on NT
machines), so it will reintroduce a d_ino declaration in the headers.  You
can test this out now by using a cygwin snapshot.

-- 
Eric Blake

--
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: Windows Vista Beta 2

2006-04-29 Thread Robert Pendell
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jennifer Smith wrote:
> I tried to install cygwin on the Windows Vista Beta 2 (build 5308), here
> are the problems I've run into:
> 1) During package install bash seems to crash.
> I get this dialog from windows:
> Please close bash.exe
> A problem caused the program to stop working correctly. Windows will
> notify you if a solution is available.
>
> This occurs (it appears) once per package.
>
> 2) After install tools crash. About one in three times I run ls in
> /usr/bin I get:
>
> [EMAIL PROTECTED] /usr/bin]$ ls
>  6 [main] ? (4596) C:\cygwin\bin\tcsh.exe: *** fatal error -
> couldn't alloc
> ate heap, Win32 error 0, base 0x80, top 0x89B000, reserve_size
> 630784, alloc
> size 634880, page_const 4096
> 36534798 [main] tcsh 3908 child_copy: stack write copy failed,
> 0x227010..0x23000
> 0, done 0, windows pid 2256708, Win32 error 5
> No more processes.
>
> If you would like anymore information feel free to contact me at this
> email address.
>
> Thanks,
>
> Jennifer

I don't see it likely that cygwin will be actively supported on Vista
until that OS is officially released or there is at minimum a public beta.

Also last I checked beta 2 hasn't come out.  They were still releasing
refresh releases for Beta 1.

- --
Robert Pendell
[EMAIL PROTECTED]

Thawte Web of Trust Notary
CAcert Assurer
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.2 (MingW32)

iD8DBQFEU7cxNqnRaBCOmrYRAsULAKCL2M7oLAOpVOFDT+h/T+ejdPKpgQCfelsg
2sVXJTUL+rVF7zKC6VzOioE=
=DPvA
-END PGP SIGNATURE-


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



X-client on Cygwin/XP, X-server on 'Nix

2006-04-29 Thread Friendly neighborhood Cygwin user
Hello!

I have sshd, ssh, and X11 set up on my XP laptop such that I can "ssh -Y"
into linux boxes and run programs there while sitting at my laptop.

I would like also to do the reverse:  To "ssh -X" into my laptop from a
unix box and to run x-clients on my laptop while sitting at the unix
workstation.  I can ssh into my laptop, but I cannot get x-forwarding
working in this direction.

When I try to start an x-client on my laptop from a unix box, I get the
following error:

$ xeyes
X11 connection rejected because of wrong authentication.
X connection to localhost:10.0 broken (explicit kill or server shutdown).

I have made sure that the line "X11Forwarding yes" is in /etc/sshd_config.
I also  tried to create a file called "~/.ssh/.config" with the line
"ForwardX11=yes" in it.

While SSHed into my laptop, I can see that $DISPLAY has been appropriately
set:
$ echo $DISPLAY
localhost:10.0

as opposed to, when logged in locally,
$ echo $DISPLAY
127.0.0.1:0.0

I can also see that 'localhost' is resolved correctly ("MACHINE2048" is
my laptop):
$ ping localhost
Pinging MACHINE2048 [127.0.0.1] with 32 bytes of data:
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128

When I run xhost, everything appears to be correct:
$ xhost
access control enabled, only authorized clients can connect
INET:MACHINE2048
INET:localhost
INET:MACHINE2048.netname.net <-- Actual netname removed
LOCAL:

I'm stumped.  Any ideas?  (Thanks in advance!)


--
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: X-client on Cygwin/XP, X-server on 'Nix

2006-04-29 Thread Brett Serkez



X11 connection rejected because of wrong authentication.
X connection to localhost:10.0 broken (explicit kill or server shutdown).



In theory you have credentials in a file called .Xauthority.  These
credentials are forwarded along with the display and need to be sent
back to the X-server to authenticate individual connections.

See 'man xauth' for more details.

Brett

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



Geomview and Cygwin

2006-04-29 Thread Lloyd Wood


> So, that means that "Geomview" will either have to use what we provide
> or decide not to support Cygwin.

I suspect Geomview will just wait for Cygwin to return its support 
for d_ino in 1.5.20. Thanks to Eric Blake for an informative message. 
(How to download snapshots? There's nothing newer than 1.5.19-4 in 
Cygwin setup, even when I hit the 'exp' button.)


(aside: interesting that Christopher Faylor's mails apparently have 
me on cc, but those copies never reach me -- a side-effect of how 
their header addresses are munged? Not so much do-not-reply as 
do-not-see. I've caught up on the thread via the web archive.)


L.


--
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: Geomview & Cygwin setup [Attn gcc maintainer]

2006-04-29 Thread Christopher Faylor
On Sat, Apr 29, 2006 at 04:46:31PM +, Eric Blake wrote:
>However, I feel that the output of gcc -v is not entirely freeform, because
>part of it is also used in gcc --version.  In this recent autoconf thread,
>http://lists.gnu.org/archive/html/autoconf/2006-04/msg00116.html,
>it was pointed out that Debian has a similar bug where their gcc's
>version output violates GNU coding standards by not ending in a
>version number.  Gerritt, I would suggest that the next time you
>package gcc for cygwin, that you alter the version string such that
>it ends in a version number, perhaps something like:
>gcc (GCC) 3.4.4 (cygwin/mingw special, gdc 0.12, dmd 0.125) 3.4.4-2

When I first introduced the parentheses in the version, I tried to
follow advice of one of the gcc developers and I patterned the output
vaguely on some version of Red Hat's gcc.

I've just run 'gcc --version' on Fedora, Gentoo, Cygwin, and Debian,.
All of their version strings end with a parenthesized expression.  The
only thing that they seem to do that Cygwin doesn't is include some
variation of the gcc version within the parentheses.  So, if you know
you're running on "Gentoo Linux" you'll be able to find out what release
of, e.g., gcc 3.3.4 you're using).  This particular bit of information
would not solve the intractable problem which started this discussion.

I don't see any reason for Gerrit to change anything except possibly
to put everything within one parenthesized expression.  "GNU standards"
aside, we seem to be in good company.

Now, let's move on from this topic?  Please?  I really don't think it
deserves this much attention.

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: Geomview and Cygwin

2006-04-29 Thread Christopher Faylor
On Sat, Apr 29, 2006 at 09:44:36PM +0100, Lloyd Wood wrote:
>>So, that means that "Geomview" will either have to use what we provide
>>or decide not to support Cygwin.
>
>I suspect Geomview will just wait for Cygwin to return its support for
>d_ino in 1.5.20.  Thanks to Eric Blake for an informative message.
>(How to download snapshots?  There's nothing newer than 1.5.19-4 in
>Cygwin setup, even when I hit the 'exp' button.)

Go to the cygwin web site and look at the left box.  Click on the
appropriate link.

Or, typing "cygwin snapshots" into google would also have found it.

>(aside: interesting that Christopher Faylor's mails apparently have 
>me on cc, but those copies never reach me -- a side-effect of how 
>their header addresses are munged? Not so much do-not-reply as 
>do-not-see. I've caught up on the thread via the web archive.)

Ok.  I haven't bothered to cc you in this message but if my email
doesn't reach you because of the "no-personal-reply-please" part then it
would be your mail software rejecting it.  However, thanks for letting
me know so that I won't go to that effort again.

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/



[ANNOUNCEMENT] Updated: bash-3.1-6

2006-04-29 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

A new release of bash, 3.1-6, is available, replacing 3.1-5 as the current
version.

NEWS:
=
This is a minor patch release.  The postinstall scripts are updated to
ensure that /bin/sh is up-to-date even if you use tcsh as your login
shell, as well as to silence an error message that was printed to stdout
if you use an out-of-date /bin/sh as your login shell.  Remember, you must
not have any bash or /bin/sh instances running when you upgrade the bash
package.  This release will work with cygwin-1.5.19-4 or later.

DESCRIPTION:

Bash is an sh-compatible shell that incorporates useful features from the
Korn shell (ksh) and C shell (csh).  It is intended to conform to the IEEE
POSIX P1003.2/ISO 9945.2 Shell and Tools standard.  It offers functional
improvements over sh for both programming and interactive use. In
addition, most sh scripts can be run by Bash without modification.

As of the bash 3.0 series, cygwin /bin/sh defaults to bash, not ash,
similar to Linux distributions.

UPDATE:
===
To update your installation, click on the "Install Cygwin now" link on the
http://cygwin.com/ web page.  This downloads setup.exe to your system.
Save it and run setup, answer the questions and pick up 'bash' in the
'Base' category (it should already be selected).

DOWNLOAD:
=
Note that downloads from sources.redhat.com (aka cygwin.com) aren't
allowed due to bandwidth limitations.  This means that you will need to
find a mirror which has this update, please choose the one nearest to you:
http://cygwin.com/mirrors.html

QUESTIONS:
==
If you want to make a point or ask a question the Cygwin mailing list is
the appropriate place.

- --
Eric Blake
volunteer cygwin bash maintainer

CYGWIN-ANNOUNCE UNSUBSCRIBE INFO:
=
To unsubscribe to the cygwin-announce mailing list, look at the
"List-Unsubscribe: " tag in the email header of this message.  Send email
to the address specified there.  It will be in the format:

[EMAIL PROTECTED]

If you need more information on unsubscribing, start reading here:

http://sources.redhat.com/lists.html#unsubscribe-simple

Please read *all* of the information on unsubscribing that is available
starting at this URL.

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEU+Di84KuGfSFAYARAktfAJ9iSdAE/HCiUo2ywowxE4aN/BqLagCgnSKE
OZj6BgaaG7ZYZ0hG15t4R3Y=
=d0SN
-END PGP SIGNATURE-

--
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 I detect a failure in Make?

2006-04-29 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

According to Doyle Rhynard on 4/28/2006 3:51 PM:
> 
> Use "remake" the make debugger 
> It will allow you to step through the makefile and stop when an error is
> found.

You know, remake is built by the same guy that does bashdb, and since I
maintain bashdb, I ought to at least consider ITP'ing remake (adding that
to my ever-growing list of TODO items).  But first, it would be nice if we
had an active maintainer interested in porting the new make 3.81 to cygwin
(hmm, maybe another package I should ITP, if I had the time).

- --
Life is short - so eat dessert first!

Eric Blake [EMAIL PROTECTED]
volunteer cygwin bashdb maintainer
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEU+u/84KuGfSFAYARAqprAKCwJFsGTwn8C5s/4rtI1PmndOa3JgCfeJBh
oNKIkNyvQqCiBZrn1bPlhcw=
=CQf1
-END PGP SIGNATURE-

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



99 MB Hosting 9 YTL - www.acilhost.com

2006-04-29 Thread kampanya

BÖYleSi GöRÜLMeDİ





+999 MB Hosting

+999 MB MysQl 

+100 Pop3 Web Mail

+10 GB Veri Transferi

 10 DOMAIN BARINDIRMA Özelliği...(10 lu  Paket)



Sadece  99  YTL



İster bir yıllık alın, ister 2-3-4-5 yıllık



Bu kampanya kaçmaz...



www.acilhost.com / İNTERNETTEKİ EVİNİZ


--
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: Error on /bin/sh -login: "cannot remove /bin/sh.exe: Permission denied"

2006-04-29 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

According to Webb Roberts on 4/27/2006 2:00 PM:
>> I will also try to clean up the profile script to short-circuit when you
>> are running /bin/sh instead of /bin/bash 
> 
> One thing you might do is to have the /etc/profile.d sh-update-script
> delete itself once it's run satisfactorily.

Nope.  If I did that, cygcheck -c would report bash as incomplete.  And
the thought of self-modifying scripts, while workable, made this sound
more complex than I wanted.  So I gave up.  With the newly released
bash-3.1-6, if you use /bin/sh as your login shell, then upgrade bash, it
is your own fault if /bin/sh is out-of-date with respect to the upgraded
bash.  But since the default cygwin.bat uses bash as the login shell, I'm
not too worried about catering to the minority (besides, if someone has
dug in deep enough to change their login shell, I suspect they are smart
enough to know how to fix things when they go wrong).

It does point out a wishlist item of mine - cygcheck -svr output would be
nicer if it also included --version output (or at least the first line
thereof) for each common tool it searched for, rather than just the path
where the common tool was found.

> 
> I guess what got me on this was that there was a zombie /bin/sh process
> running during the cygwin update.  It might have been a little less
> nerve-wracking if there had been a visible message during the
> postinstall, instead of picking it up during the login.

Well, the CVS sources for setup.exe DO have some better handling of failed
postinstalls, but no one has officially released a new version yet
(although you can find alpha builds if you look at http://cygwin.com/setup/.

- --
Life is short - so eat dessert first!

Eric Blake [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEU/bB84KuGfSFAYARAu5KAKC6AVDrV2mHZ4BQqLSHKM6zM7PVIQCgyzYF
1Ds5JaW6tLHlKfG9wWmWiu8=
=D4hT
-END PGP SIGNATURE-

--
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: Recovering after updating while cygwin was running

2006-04-29 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

According to Ido Trivizki on 4/28/2006 6:58 PM:
> memory version mismatch detected - 0x75BE0074/0x75BE0096.
> This problem is probably due to using incompatible versions of the
> cygwin DLL.

Are you sure you searched all the directories on your PATH for a rogue
cygwin1.dll?  Are you running any cygwin services?

> I repeated it several times with rebooting, and still I can't run
> anything. (Including cygcheck, pardon.)

I beg to differ.  cygcheck is a raw windows executable, and does not
depend on cygwin1.dll, so it will work even when nothing else will (the
fact that it happens to invoke subprocesses that depend on cygwin, and
that those subprocesses may fail or cause a popup box when cygwin1.dll is
not found is irrelevant to my claim that cygcheck itself will still work).

> 
> Could you please help me?

Not without the output of 'cygcheck -svr'.  You might also try a process
explorer, such as the one from sysinternals.org, to find where the
complaining cygwin program claims to be loading its cygwin1.dll from.

- --
Life is short - so eat dessert first!

Eric Blake [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEU/h484KuGfSFAYARAsARAJ9YfwNZfgkZemJWvJEDaYIB9guPrQCfXUCb
oFF9YS3Kk3kLtcplqPK14rQ=
=ooeQ
-END PGP SIGNATURE-

--
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 I detect a failure in Make?

2006-04-29 Thread Christopher Faylor
On Sat, Apr 29, 2006 at 04:42:08PM -0600, Eric Blake wrote:
>According to Doyle Rhynard on 4/28/2006 3:51 PM:
>> Use "remake" the make debugger 
>> It will allow you to step through the makefile and stop when an error is
>> found.
>
>You know, remake is built by the same guy that does bashdb, and since I
>maintain bashdb, I ought to at least consider ITP'ing remake (adding that
>to my ever-growing list of TODO items).  But first, it would be nice if we
>had an active maintainer interested in porting the new make 3.81 to cygwin
>(hmm, maybe another package I should ITP, if I had the time).

No.  There is no need for you to ITP packages that I maintain.  What an odd
notion.

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/



Truncated Environment Variables? - using Cygwin + GetEnvironmentStrings() WIN32 API

2006-04-29 Thread Kaveh Goudarzi

Hi,

I'm working on an app which attempts to get
the environment of running cygwin apps.  It does this
by running the GetEnvironmentStrings() win32 api call
in the context of the running cygwin app (code injection).
However the result that comes back as a truncated version of
the environment - only 4 values PATH, SYSTEMDRIVE, SYSTEMROOT,
WINDIR.

You can reproduce this by compiling envs.c attached.
(gcc -o envs-gcc.exe envs-gcc.c).  If you run the resulting exe
in cmd.exe (win xp) you get the full env in both cases but
if you run it under bash then the windows version is truncated.

I saw the article below which seems relevant but I
was confused because my understanding of it would mean that
the call using win32 api should fail when run under both cmd.exe
and bash.exe which is not the case.

http://cygwin.com/ml/cygwin/2006-01/msg00938.html


I would be most grateful if someone could tell me
why this might be happening and what possible alternative
paths I could follow.

thanks in advance + kind regards,

Kaveh.

PS. I've attached the output of "cygcheck -s -v -r > cygcheck.out"
and am running Windows XP Professional SP2
cygcheck -s -v -r
#include 
#include 
#include 

int main ( int argc, char * argv[] , char *envp[] )
{
   int i = 0 ;
   int j = 0 ;
   char * envw = NULL ;
   printf ("== GCC Environment ==\n") ;
   i = 0 ;
   while ( envp[i] != NULL )
  {
  printf ("%s\n", envp[i++] ) ;
  }
   //   printf ("&argv=0x%x 0x%x, &environ=0x%x\n", argv, argv, environ ) ;

   printf ("\n\n== Windows GetEnvironmentStrings 
Environment ==\n") ;
   envw =  GetEnvironmentStrings();
   while ( strlen (envw) > 0 )
 {
 j++ ;
 printf ("%s\n",envw);
 envw += strlen(envw) + 1;
 }

   printf ("\n\nWindows Env Strings: %d, Cygwin Env Strings Count: %d\n\n", j, 
i) ;

}

--
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: Truncated Environment Variables? - using Cygwin + GetEnvironmentStrings() WIN32 API

2006-04-29 Thread Eric Blake

> 
>   I'm working on an app which attempts to get
> the environment of running cygwin apps.  It does this
> by running the GetEnvironmentStrings() win32 api call
> in the context of the running cygwin app (code injection).

That is somewhat risky, as recent threads have discussed how
windows update does a code injection that interferes with cygwin
and deadlocks the processor into 100% utilization.

> However the result that comes back as a truncated version of
> the environment - only 4 values PATH, SYSTEMDRIVE, SYSTEMROOT,
> WINDIR.

Correct.  That's all the more cygwin processes use of the Windows
environment.  Going through Windows is slow and limited, so
cygwin uses its own environment, converting to Windows only
at the last minute when spawning a non-cygwin process.

> 
>   I saw the article below which seems relevant but I
> was confused because my understanding of it would mean that
> the call using win32 api should fail when run under both cmd.exe
> and bash.exe which is not the case.
> 
> http://cygwin.com/ml/cygwin/2006-01/msg00938.html

A cygwin process invoked directly from cmd.com (currently)
does not go out of its way to clear the environment, but
child processes of cygwin do not waste time propagating
everything via the Windows environment.

> 
>   I would be most grateful if someone could tell me
> why this might be happening and what possible alternative
> paths I could follow.

If you wanted to be more like Linux, you could implement
something in the /proc virtual file system that enumerated
the environment of a particular process; by asking cygwin
what cygwin thinks the environment, and without thread
injection, you would get a better answer than by asking
Windows about the cygwin environment; plus, you will be
isolated from any further implementation changes cygwin
makes with its under-the-hood handling of the environ.

Why do you need to know the environment of a running
cygwin process, anyways?  Perhaps explaining your
need would allow us to come up with an alternative
approach.

> 
> PS. I've attached the output of "cygcheck -s -v -r > cygcheck.out"

Actually, you attached a one line file with contents "cygcheck -s -v -r".

-- 
Eric Blake


--
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: Truncated Environment Variables? - using Cygwin + GetEnvironmentStrings() WIN32 API

2006-04-29 Thread Brian Dessent
Kaveh Goudarzi wrote:

> I'm working on an app which attempts to get
> the environment of running cygwin apps.  It does this
> by running the GetEnvironmentStrings() win32 api call
> in the context of the running cygwin app (code injection).
> However the result that comes back as a truncated version of
> the environment - only 4 values PATH, SYSTEMDRIVE, SYSTEMROOT,
> WINDIR.

This is the expected behavior.  Cygwin maintains its own environment
separate from the Windows environment.  This is (presumably) to reduce
the overhead of having to convert paths back and forth every time a
value is accessed.

The only variables kept in the Windows environment are those that are
essential to various win32 API calls, which as you have seen are things
like SYSTEMROOT.  Also, when Cygwin knows that it will be spawning a
non-Cygwin binary, it will sync the Windows environment so that it is
filled out.

This is not a problem for the vast majority of Cygwin apps because the
way to access the environment in a POSIX-like way is with getenv() and
putenv(), and these work as expected on the Cygwin environment.  Calling
the win32 API directly to manipulate the environment breaks the
encapsulation layer in that the proper way for a POSIX program to do
this is with getenv/putenv, and Cygwin targets the POSIX API.

So, the ideal way to handle this is to use getenv() instead.  As an
alternative you could call cygwin_internal (CW_SYNC_WINENV) before
calling any win32 APIs, which should fill out the Windows environment.

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/



Re: Truncated Environment Variables? - using Cygwin + GetEnvironmentStrings() WIN32 API

2006-04-29 Thread Kaveh Goudarzi

Hi Eric/Brian,

Thanks for your responses.  I hope you don't mind
answering a few more questions :-)

1. is it possible to somehow force cygwin to always sync
the env with windows prior to spawning a child process (any
child process)?

2. How does cygwin work out if it's spawning a cygwin or
non-cygwin binary?  (is it based on refs to cygwin1.dll?)
(is it the loader that does this?)

3. Brian mentioned a call to cygwin_internal(CW_SYNC_WINENV)
In my scenario (see below) I'd have to work out if the target
process was a cygwin proc or not before I tried to invoke this
method ... is there a painless way of working out if a process
is cygwin or not e.g. one that would give me a response whether
the process I'm querying is a cygwin or a native win app?

Why I need the env:
-
I'm working on a tool which aims to automatically
intercept code builds (e.g. make, nmake etc.) and produce
alternative versions of the compiled code with some enhancements.
The aim is to do this transparently so all a developer need do
is run my spy program, then do a make clean, make and we would
catch all the build commands, grab the command line, working dir
and environment passed to gcc for example and use that info in
the enhanced "compiler" to produce the alternative build.  The
target builds however are not necessarily all cygwin based - e.g.
could be MS builds done via nmake or even an IDE.

Thanks again for your help!

Kaveh.

PS. Eric - I figure that since this is generic cygwin behaviour
there isn't any point in attaching the result of cygcheck now... let
me know if it adds anything and I'll attach it in the next e-mail.

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



[ANNOUNCEMENT] Updated: texinfo-4.8-2

2006-04-29 Thread Christopher Faylor
I've made a new version of 'texinfo' available for installation.  This
version should correctly translate files which contain CRLF and it also
fixes a trivial problem found by the texinfo test suite where texinfo
did not properly recognize /dev/null as the null device.

For a brief description of this package, and listing of the files it
contains, see http://cygwin.com/packages/texinfo .

To update your installation, click on the "Install Cygwin now" link on
the http://cygwin.com/ web page.  This downloads setup.exe to your
system.  Then, run setup and keep clicking "Next".

If you have questions or comments, please send them to the Cygwin
mailing list.

  *** CYGWIN-ANNOUNCE UNSUBSCRIBE INFO ***

If you want to unsubscribe from the cygwin-announce mailing list, please
use the automated form at:

http://cygwin.com/lists.html#subscribe-unsubscribe

If this does not work, then look at the "List-Unsubscribe: " tag in the
email header of this message.  Send email to the address specified
there.  It will be in the format:

[EMAIL PROTECTED]

If you need more information on unsubscribing, start reading here:

http://sources.redhat.com/lists.html#unsubscribe-simple

Please read *all* of the information on unsubscribing that is available
starting at this URL.

--
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: Truncated Environment Variables? - using Cygwin + GetEnvironmentStrings() WIN32 API

2006-04-29 Thread Christopher Faylor
On Sun, Apr 30, 2006 at 03:32:55AM +, Eric Blake wrote:
>On Sun, Apr 30, 2006 at 04:12:52AM +0100, Kaveh Goudarzi wrote:
>>I'm working on an app which attempts to get the environment of running
>>cygwin apps.  It does this by running the GetEnvironmentStrings() win32
>>api call in the context of the running cygwin app (code injection).
>
>That is somewhat risky, as recent threads have discussed how windows
>update does a code injection that interferes with cygwin and deadlocks
>the processor into 100% utilization.

Actually, it is unlikely that this is as simple as "code injection
causes problems".  I was playing with this technique a while ago with
cygwin programs and I never saw the rumored 100% CPU utilization.

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: Truncated Environment Variables? - using Cygwin + GetEnvironmentStrings() WIN32 API

2006-04-29 Thread Brian Dessent
Kaveh Goudarzi wrote:

> 1. is it possible to somehow force cygwin to always sync
> the env with windows prior to spawning a child process (any
> child process)?

Well, you could always patch the DLL to not perform this optimization. 
I'm not sure if it's possible to do this in any other way.

> 2. How does cygwin work out if it's spawning a cygwin or
> non-cygwin binary?  (is it based on refs to cygwin1.dll?)
> (is it the loader that does this?)

I think it looks at the PE headers of the file for a record referring to
cygwin1.dll in the import section.  Or, if the path is mounted cygexec
this check is skipped and all binaries are assumed to be Cygwin
binaries, so you might be able to invert the sense of this somehow.

Also, there was some recent discussion about whether this optimization
was worth the headaches (in the context of programs that included
WinMain() failing when calling GetEnvironmentString()) and I think the
result was that the optimization was dropped... so I don't know what the
current state of this in CVS is.  I think cgf or Corinna (if she wasn't
away on vacation right now) would have to clarify here.

> 3. Brian mentioned a call to cygwin_internal(CW_SYNC_WINENV)
> In my scenario (see below) I'd have to work out if the target
> process was a cygwin proc or not before I tried to invoke this
> method ... is there a painless way of working out if a process
> is cygwin or not e.g. one that would give me a response whether
> the process I'm querying is a cygwin or a native win app?

#include 
#include 

int main()
{
  HMODULE hm = GetModuleHandle ("cygwin1.dll");
  
  if (hm && GetProcAddress (hm, "cygwin_internal"))
puts ("I appear to be a cygwin binary.");
  else
puts ("Nope, no Cygwin here.");
}

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/