bash pipeline exit code - possible race condition?

2009-07-28 Thread David Antliff
I've noticed a strange problem with bash pipelines in Cygwin that might indicate some sort of race condition. I cannot reproduce the problem on a Linux system, but it seems easy to reproduce in Cygwin. I'm running the following command in a bash script that builds some software: /usr/bin/make --v

Re: Emacs can't start-process more than 30~40 processes

2009-07-28 Thread Haojun Bao
Dave Korn writes: > Haojun Bao wrote: > >> >> My question is, is there anyway out of this? Can I just rebase >> cygwin1.dll to the end of all other DLLs? > > It ought to work. Would you mind giving it a try and letting us know if it > helps? It might be a good idea to tweak rebaseall to do

Re: install from install files?

2009-07-28 Thread Larry Hall (Cygwin)
On 07/28/2009 07:33 PM, Robert Mark Bram wrote: One more question: I notice that each time I update Cygwin, I get another "ftp...mirror.. " folder. I know this is not your question but I figured it was a point that was worth documenting for the archives if nothing else (though it has been ma

Re: Emacs can't start-process more than 30~40 processes (Was: Re: Emacs w3m `w3m-toggle-inline-images' cause segfault)

2009-07-28 Thread Christopher Faylor
On Tue, Jul 28, 2009 at 10:52:44AM +0800, Haojun Bao wrote: >Haojun Bao writes: > >> I have reduced the test case in this mail >> http://cygwin.com/ml/cygwin/2009-07/msg00111.html >> to a simpler one: >> >> $/bin/emacs --batch -q --execute '(let ((num 0)) >> (while (< num 30) >>

Re: install from install files?

2009-07-28 Thread Dave Korn
Robert Mark Bram wrote: > Yes, I did mean the package directory, e.g.: > C:\Documents and Settings\rbram\My > Documents\Downloads\ftp%3a%2f%2fmirror.aarnet.edu.au%2fpub%2fsourceware%2fcygwin%2f > > One more question: I notice that each time I update Cygwin, I get > another "ftp...mirror.. " folder

Re: mingw headers and libraries missing

2009-07-28 Thread Dave Korn
Chris Sutcliffe wrote: >> It'll just be a matter of replacing "gcc -mno-cygwin" by >> "i686-pc-mingw32-gcc". > > I know I'm going off-topic here, but I believe you mentioned before, > mingw-runtime and w32api will have to move locations. I'd be more > than happy to accomodate (I'm really lookin

Re: install from install files?

2009-07-28 Thread Robert Mark Bram
Thanks Dave, >> If I install Cygwin from the internet and copy the cygwin files to my >> USB, can I later install Cygwin on another machine from those files? > > As long as by "Copy the cygwin files", you mean the local package directory, > rather than the cygwin install tree, then yes. Just run

Re: mingw headers and libraries missing

2009-07-28 Thread Chris Sutcliffe
>  It'll just be a matter of replacing "gcc -mno-cygwin" by > "i686-pc-mingw32-gcc". I know I'm going off-topic here, but I believe you mentioned before, mingw-runtime and w32api will have to move locations. I'd be more than happy to accomodate (I'm really looking forward to a true mingw cross-c

Re: mingw headers and libraries missing

2009-07-28 Thread Colin Harrison
Hi, "simple enough for a dumb engineer who is not a programmer" Couldn't resist I bet that dumb engineer "Can't write a software wizard" but he "Sure plays a mean pinball" Thanks, Colin Harrison (Engineer) -- Problem reports: http://cygwin.com/problems.html FAQ: ht

Invalid csih method in ssh-user-config scripts

2009-07-28 Thread Steven Hartland
In the latest version of ssh-user-config from 1.7 it uses the method csih_error_multiline which doesn't exist, I assume this should be csih_error_multi from: /usr/share/csih/cygwin-service-installation-helper.sh Regards Steve -- Problem reports: http://cygwin.com/problems.html FAQ:

Re: mingw headers and libraries missing

2009-07-28 Thread Larry Hall (Cygwin)
On 07/28/2009 05:03 PM, Dave Korn wrote: Charles D. Russell wrote: Dave Korn wrote: Charles D. Russell wrote: Dave Korn wrote: You have just discovered why -mno-cygwin is a kludgey hack that we are removing from future versions of the compiler! Kludgey perhaps, but handy for me. If I wa

Re: mingw headers and libraries missing

2009-07-28 Thread Dave Korn
Charles D. Russell wrote: > Dave Korn wrote: >> Charles D. Russell wrote: >>> Dave Korn wrote: >>> You have just discovered why -mno-cygwin is a kludgey hack that we are removing from future versions of the compiler! >>> Kludgey perhaps, but handy for me. If I want to give a copy of on

Re: mingw headers and libraries missing

2009-07-28 Thread Charles D. Russell
Dave Korn wrote: Charles D. Russell wrote: Dave Korn wrote: You have just discovered why -mno-cygwin is a kludgey hack that we are removing from future versions of the compiler! Kludgey perhaps, but handy for me. If I want to give a copy of one of my fortran console apps to a colleague, I

Re: Full 1.7 Install -> "Insufficient disk space to repair security descriptor at index $SII for file 9"Re:

2009-07-28 Thread Stephen M. Kneton
>> It's pretty clear that the damage is done by chkdsk due to a bug in XP. > > I tend to think so, but surely the one test you haven't yet tried is seeing if you can reproduce this effect without tampering with the partitions at all? (Do you have another similar system where the HD still has it

Re: bug in mbrtowc?

2009-07-28 Thread Corinna Vinschen
On Jul 28 13:33, Andy Koppe wrote: > 2009/7/28 Corinna Vinschen: > >> >> Trouble is, the hack will also only work correctly if the whole UTF-8 > >> >> sequence for the non-BMP character is passed at once. If you pass the > >> >> bytes one-by-one instead, and assuming the bug above wasn't there, > >

Re: AWK from a batch file

2009-07-28 Thread Corinna Vinschen
On Jul 28 11:42, Matthew Swanson wrote: > I am attempting to run AWK in a bash window through a Windows batch file. I > am using: > > echo awk -v FS=',' -v OFS=',' '^{ > awk.s > echo if ^($2 ~ /^^[0-9]*$/^)>> awk.s > echo print $0 ^>^> "good_file.txt">> awk.s > echo else>> awk.

AWK from a batch file

2009-07-28 Thread Matthew Swanson
I am attempting to run AWK in a bash window through a Windows batch file. I am using: echo awk -v FS=',' -v OFS=',' '^{ > awk.s echoif ^($2 ~ /^^[0-9]*$/^)>> awk.s echoprint $0 ^>^> "good_file.txt">> awk.s echoelse>> awk.s echoprint $0 ^>^> "bad_file.txt">> awk.s e

Re: Odd directory created when installing 1.7

2009-07-28 Thread Cliff Hones
Corinna Vinschen wrote: > On Jul 28 14:43, Cliff Hones wrote: >> Cliff Hones wrote: >>> .. One further possibly useful piece >>> of informaion - the create timestamps on the odd directories are all the >>> same, and 14 seconds later than the timestamp on the correct "dev" >>> directory. >> Looking

Re: mingw headers and libraries missing

2009-07-28 Thread Dave Korn
Charles D. Russell wrote: > Dave Korn wrote: > >> >> You have just discovered why -mno-cygwin is a kludgey hack that we are >> removing from future versions of the compiler! > > Kludgey perhaps, but handy for me. If I want to give a copy of one of > my fortran console apps to a colleague, I ca

Re: mingw headers and libraries missing

2009-07-28 Thread Charles D. Russell
Dave Korn wrote: You have just discovered why -mno-cygwin is a kludgey hack that we are removing from future versions of the compiler! Kludgey perhaps, but handy for me. If I want to give a copy of one of my fortran console apps to a colleague, I can simply recompile it with -mno-cygwin.

Re: Odd directory created when installing 1.7

2009-07-28 Thread Corinna Vinschen
On Jul 28 14:43, Cliff Hones wrote: > Cliff Hones wrote: > > .. One further possibly useful piece > > of informaion - the create timestamps on the odd directories are all the > > same, and 14 seconds later than the timestamp on the correct "dev" > > directory. > > Looking at the install log, I se

Re: ntfsclone for cygwin 1.7 (issues pointing to shadow copies)

2009-07-28 Thread Rob Bosch
> /proc/partitions is populated, but only with actual disks. The device > mapping for disks is a mapping from the internal NT namespace objects > \Device\HarddiskX\PartitionY to the POSIX-like /dev/sdXY. Since shadow copies > of a disk don't match this mapping, you're out of luck. Maybe we can ad

Re: Odd directory created when installing 1.7

2009-07-28 Thread Cliff Hones
Cliff Hones wrote: > .. One further possibly useful piece > of informaion - the create timestamps on the odd directories are all the > same, and 14 seconds later than the timestamp on the correct "dev" directory. Looking at the install log, I see this timestamp matches the time the bash.sh postins

Re: ntfsclone for cygwin 1.7 (issues pointing to shadow copies)

2009-07-28 Thread Larry Hall (Cygwin)
On 07/28/2009 05:27 AM, Corinna Vinschen wrote: On Jul 27 18:31, Larry Hall (Cygwin) wrote: On 07/27/2009 05:48 PM, Rob Bosch wrote: The issue appears to be with ntfsclone in that it must point to something in /proc/partitions. It will not work with any /cygdrive/X (used dosdev.c from Corinna

Re: problem for a rebaseall

2009-07-28 Thread Aurelien Decagny
Hi, Thank you for your answer. I found a part of the solution: I forgot to run the Command Prompt as administrator, but now the rebaseall function seems to work. But I still have the same problem when trying to compile Wireshark: I know that you don't develop this program, but they don't h

Re: bug in mbrtowc?

2009-07-28 Thread Andy Koppe
2009/7/28 Corinna Vinschen: >> >> Trouble is, the hack will also only work correctly if the whole UTF-8 >> >> sequence for the non-BMP character is passed at once. If you pass the >> >> bytes one-by-one instead, and assuming the bug above wasn't there, >> >> you'd get this: >> > >> > Yes, I know.  

Re: wchar_t width (was: bug in mbrtowc?)

2009-07-28 Thread Corinna Vinschen
On Jul 28 12:37, Andy Koppe wrote: > 2009/7/28 Corinna Vinschen: > >> Trouble is, the hack will also only work correctly if the whole UTF-8 > >> sequence for the non-BMP character is passed at once. If you pass the > >> bytes one-by-one instead, and assuming the bug above wasn't there, > >> you'd g

Re: install from install files?

2009-07-28 Thread Dave Korn
Robert Mark Bram wrote: > Hi All, > > If I install Cygwin from the internet and copy the cygwin files to my > USB, can I later install Cygwin on another machine from those files? As long as by "Copy the cygwin files", you mean the local package directory, rather than the cygwin install tree, th

Re: mingw headers and libraries missing

2009-07-28 Thread Georg Troska
Hi Dave, the dependency was a bug of my own. I tried linked against pthread... now the my dll does not depend on cygwin1.dll anymore Thanks a lot for your help Georg Am 28.07.2009 um 12:56 schrieb Georg Troska: Hi, this information was very usefull to me. Thank you very much. My plan is to

Re: mingw headers and libraries missing

2009-07-28 Thread Dave Korn
Georg Troska wrote: > Hi, > this information was very usefull to me. Thank you very much. > > My plan is to build a dll with cygwin, that does not depend on cygwin1.dll. > unfortunatelly my library is build now (that is great) but it still > depends on cygwin1.dll (I have done objdump -P .. | grep

Re: How to install-libLTLIBRARIES dll to bin?

2009-07-28 Thread Charles Wilson
Dave Korn wrote: > Only libtool knows about the DLL. Only the Makefile knows about the setting > of $bindir from configure. Currently however the Makefile only passes the > path to the output in $libdir. Therefore ISTM that the only correct solution > is to add a --bindir= option to libtool a

wchar_t width (was: bug in mbrtowc?)

2009-07-28 Thread Andy Koppe
2009/7/28 Corinna Vinschen: >> Trouble is, the hack will also only work correctly if the whole UTF-8 >> sequence for the non-BMP character is passed at once. If you pass the >> bytes one-by-one instead, and assuming the bug above wasn't there, >> you'd get this: > > Yes, I know.  The real trouble i

install from install files?

2009-07-28 Thread Robert Mark Bram
Hi All, If I install Cygwin from the internet and copy the cygwin files to my USB, can I later install Cygwin on another machine from those files? Rob :) General Blog: http://robertmarkbram.blogspot.com/ Technical Blog: http://robertmarkbramprogrammer.blogspot.com/ Profile: http://www.google.com

Re: 1.7.0: read() blocking with VMIN = VTIME = 0

2009-07-28 Thread daniel åkerud
On Tue, Jul 28, 2009 at 1:00 PM, daniel åkerud wrote: > With my example program below the read() is blocking even though > canonical input is set and VMIN = VTIME = 0. I mean non-canonical here. *ups* > It is supposed to act in a non-blocking way. > And this is from the libc documentation: http:

Re: 1.7.0: read() blocking with VMIN = VTIME = 0

2009-07-28 Thread Corinna Vinschen
On Jul 28 13:00, daniel ?kerud wrote: > Hello! > > With my example program below the read() is blocking even though > canonical input is set and VMIN = VTIME = 0. > It is supposed to act in a non-blocking way. > > Does not work on: > CYGWIN_NT-5.0 1.7.0(0.212/5/3) 2009-07-24 09:59 > > Works on:

1.7.0: read() blocking with VMIN = VTIME = 0

2009-07-28 Thread daniel åkerud
Hello! With my example program below the read() is blocking even though canonical input is set and VMIN = VTIME = 0. It is supposed to act in a non-blocking way. Does not work on: CYGWIN_NT-5.0 1.7.0(0.212/5/3) 2009-07-24 09:59 Works on: Linux version 2.6.28-13-generic (bui...@vernadsky) (gcc ve

Re: mingw headers and libraries missing

2009-07-28 Thread Georg Troska
Hi, this information was very usefull to me. Thank you very much. My plan is to build a dll with cygwin, that does not depend on cygwin1.dll. unfortunatelly my library is build now (that is great) but it still depends on cygwin1.dll (I have done objdump -P .. | grep dll) Is it possible that

Re: [1.7] bash UNC path bug?

2009-07-28 Thread Dave Korn
Shaddy Baddah wrote: > Hi, > > bash... maybe cygpath, seems to be doing something weird: > > $ cygpath -u '\\someuncpath\someshare' > //someuncpath/someshare > $ echo `cygpath -u '\\someuncpath\someshare'` > /cygdrive/c/someuncpath/someshare > $ # what's going on here Dunno, but this sheds a l

Wrong cp exe magic

2009-07-28 Thread Reini Urban
I forgot if this was already raised, but it looks pretty weird: $ cp /usr/src/xapian/xapian-omega-1.0.14a/.build/.libs/scriptindex /bin/ cp: cannot create regular file `/bin/scriptindex': File exists $ cp -f /usr/src/xapian/xapian-omega-1.0.14a/.build/.libs/scriptindex /bin/ cp: cannot create reg

Re: How to install-libLTLIBRARIES dll to bin?

2009-07-28 Thread Dave Korn
Peter Rosin wrote: > Automake does not "know" that it is a dll, it only sees a libtool > library (.la), and I think "libtool --mode=install" is supposed to > outsmart $libdir, by adding ../bin to the end of the directory > part of the path (i.e. copy the dll to $DESTDIR)$(libdir)/../bin > in this c

Re: How to install-libLTLIBRARIES dll to bin?

2009-07-28 Thread Dave Korn
Reini Urban wrote: > I have an issue with properly autotooled + libtoolized shared libraries > where the resulting dll should end up in bindir instead of libdir. Yeh, me too. I have a horrible hack in the distro gcc that ascends directories until it finds ./lib/ and replaces that with /

Re: problem for a rebaseall

2009-07-28 Thread Dave Korn
Aurelien Decagny wrote: > But when I make the rebase all, the anwer is: > ReBaseImage (/usr/bin/cygcrypt-0.dll) failed with last error = 6 > > Ok, no problem, I search on the Internet, and it must still be a cygwin > component running on my computer. I search in the Windows Task Manager: > no cyg

Re: bug in mbrtowc?

2009-07-28 Thread Corinna Vinschen
On Jul 28 11:24, Andy Koppe wrote: > 2009/7/28 Corinna Vinschen: > > On Jul 27 22:56, Andy Koppe wrote: > >> I've encountered what looks like a bug in mbrtowc's handling of UTF-8. > >> Here's an example: > >> > >> #include > >> #include > >> #include > >> #include > >> > >> int main(void) { > >

Re: Odd directory created when installing 1.7

2009-07-28 Thread Corinna Vinschen
On Jul 28 01:45, Cliff Hones wrote: > I installed 1.7 today for the first time, having deliberately waited > until near the end of beta testing out of cowardice (no; actually > because my use of Cygwin isn't that great at the moment, is not > particularly unusual, and unfortunately I've not had the

Re: bug in mbrtowc?

2009-07-28 Thread Andy Koppe
2009/7/28 Corinna Vinschen: > On Jul 27 22:56, Andy Koppe wrote: >> I've encountered what looks like a bug in mbrtowc's handling of UTF-8. >> Here's an example: >> >> #include >> #include >> #include >> #include >> >> int main(void) { >>   wchar_t wc; >>   size_t ret; >>   mbstate_t s = { 0 };

Re: bug in mbrtowc?

2009-07-28 Thread Corinna Vinschen
On Jul 28 10:56, Andy Koppe wrote: > 2009/7/28 Pedro Izecksohn: > >  The bug is in O.P.'s code as &s is not being passed to mbrtowc. > > >From http://www.opengroup.org/onlinepubs/009695399/functions/mbrtowc.html: > "If ps is a null pointer, the mbrtowc() function shall use its own > internal mbsta

Re: Full 1.7 Install -> "Insufficient disk space to repair security descriptor at index $SII for file 9"Re:

2009-07-28 Thread Dave Korn
Stephen M. Kneton wrote: > [ ... ] MediaCenter system ntfs partition had been resized with gparted > [ ... ] The re-preinstall honored the existing partitions. The XP Pro ntfs > partition had been copied to a larger disk but not resized and the extra > space used for a linux install. The re-preins

Re: bug in mbrtowc?

2009-07-28 Thread Pedro Izecksohn
To initialize wchar_t wc=(wchar_t)0; may also help. On Tue, Jul 28, 2009 at 6:56 AM, Andy Koppe wrote: > 2009/7/28 Pedro Izecksohn: >>  The bug is in O.P.'s code as &s is not being passed to mbrtowc. > > From http://www.opengroup.org/onlinepubs/009695399/functions/mbrtowc.html: > "If ps is a nul

Re: mingw headers and libraries missing

2009-07-28 Thread Dave Korn
Georg Troska wrote: > hi, > thank you very much for this information > > Where o I find windsock.h and its library? Do I need a SDK (e.g. Visual > C++) for this? Nope, you need the w32api package (you should probably already have it), this works for both cygwin and mingw compiles and provides h

Re: bug in mbrtowc?

2009-07-28 Thread Andy Koppe
2009/7/28 Pedro Izecksohn: >  The bug is in O.P.'s code as &s is not being passed to mbrtowc. >From http://www.opengroup.org/onlinepubs/009695399/functions/mbrtowc.html: "If ps is a null pointer, the mbrtowc() function shall use its own internal mbstate_t object, which shall be initialized at prog

Re: bug in mbrtowc?

2009-07-28 Thread Pedro Izecksohn
The bug is in O.P.'s code as &s is not being passed to mbrtowc. I'm on Ubuntu. I do not have Cygwin here. I should consume some calories before trying to debug anything. On Tue, Jul 28, 2009 at 6:14 AM, Corinna Vinschen wrote: > On Jul 27 22:56, Andy Koppe wrote: >> I've encountered what l

Re: Emacs can't start-process more than 30~40 processes (Was: Re: Emacs w3m `w3m-toggle-inline-images' cause segfault)

2009-07-28 Thread Dave Korn
Haojun Bao wrote: > > My question is, is there anyway out of this? Can I just rebase > cygwin1.dll to the end of all other DLLs? It ought to work. Would you mind giving it a try and letting us know if it helps? It might be a good idea to tweak rebaseall to do this for us. cheers,

Re: regtool/registry interfacing and charset support

2009-07-28 Thread Corinna Vinschen
On Jul 28 00:58, Shaddy Baddah wrote: > Hi, > > I note that the regtool/registry interfacing do not yet support non > ASCII character sets: > > $ uname -a > CYGWIN_NT-6.0 somehost-vista 1.7.0(0.212/5/3) 2009-07-24 09:59 i686 Cygwin > $ regtool get /machine/SOFTWARE/Cygwin/setup/rootdir > C:\softw

Re: ntfsclone for cygwin 1.7 (issues pointing to shadow copies)

2009-07-28 Thread Corinna Vinschen
On Jul 27 18:31, Larry Hall (Cygwin) wrote: > On 07/27/2009 05:48 PM, Rob Bosch wrote: >> The issue appears to be with ntfsclone in that it must point to >> something in /proc/partitions. It will not work with any /cygdrive/X (used >> dosdev.c from Corinna and typical vshadow to expose as a drive

Re: [1.7] bash UNC path bug?

2009-07-28 Thread Corinna Vinschen
On Jul 28 19:07, Shaddy Baddah wrote: > Hi, > > bash... maybe cygpath, seems to be doing something weird: > > $ cygpath -u '\\someuncpath\someshare' > //someuncpath/someshare > $ echo `cygpath -u '\\someuncpath\someshare'` > /cygdrive/c/someuncpath/someshare > $ # what's going on here > $ echo "`cy

Re: bug in mbrtowc?

2009-07-28 Thread Corinna Vinschen
On Jul 27 22:56, Andy Koppe wrote: > I've encountered what looks like a bug in mbrtowc's handling of UTF-8. > Here's an example: > > #include > #include > #include > #include > > int main(void) { > wchar_t wc; > size_t ret; > mbstate_t s = { 0 }; > puts(setlocale(LC_CTYPE, "en_GB.UTF-

[1.7] bash UNC path bug?

2009-07-28 Thread Shaddy Baddah
Hi, bash... maybe cygpath, seems to be doing something weird: $ cygpath -u '\\someuncpath\someshare' //someuncpath/someshare $ echo `cygpath -u '\\someuncpath\someshare'` /cygdrive/c/someuncpath/someshare $ # what's going on here $ echo "`cygpath -u '\\someuncpath\someshare'`" /cygdrive/c/someun

Re: mingw headers and libraries missing

2009-07-28 Thread Georg Troska
hi, thank you very much for this information Where o I find windsock.h and its library? Do I need a SDK (e.g. Visual C++) for this? georg Am 27.07.2009 um 21:29 schrieb Andy Koppe: 2009/7/27 Georg Troska: I want to compile some code with -mno-cygwin. Unfortunately some mingw-libs are missi

Re: How to install-libLTLIBRARIES dll to bin?

2009-07-28 Thread Peter Rosin
Den 2009-07-28 08:10 skrev Reini Urban: I have an issue with properly autotooled + libtoolized shared libraries where the resulting dll should end up in bindir instead of libdir. Can we cygwin-spezialize that either in automake or libtool? The --mode=install $(DESTDIR)$(libdir) looks like a job