Re: Using cygwin headers/libraries in MS compiled programs

2009-12-31 Thread Haojun Bao
writes: > Folks, > > Apologies for the dumb question and please re-direct if there is a better > forum. > > How do I use cygwin *.h and *.dll in MS console programs? > > If I include in a MS program I get many conflicts between > the cygwin CRT and MS CRT stuff. Is my only options to "port" th

`cygstart bash' won't work as advertised in man-page

2009-06-03 Thread Haojun Bao
it is said in the manual that EXAMPLES Start Bash in a new window $ cygstart bash but what I get is: { b...@bhj1 /q } $cygstart bash Unable to start 'Q:\bash': The specified file was not found. I'm testing out cygwin-1.7, and it works fine on cygwin-1.5. Is this a designed featur

of and oc

2009-06-03 Thread Haojun Bao
cygstart is so useful that I want type less keys: alias of=cygstart #on cygwin-1.5 or: function of () { if which "$1" > /dev/null 2>&1; then if [[ "$1" == of ]]; then local file=`which cygstart`; else local file="`which

bash `test -e' problem with cdrom drive and soft-disk drive

2009-06-08 Thread Haojun Bao
If you have cd-rom/soft-disk drive, please run the following test case, for x in {a..z}; do if test -e /cygdrive/$x/Windows ; then echo "Windows found on /cygdrive/$x" cd /cygdrive/$x fi done And here's the result: Windows found on /cygdrive/a bash: cd

Re: bash `test -e' problem with cdrom drive and soft-disk drive

2009-06-08 Thread Haojun Bao
Corinna Vinschen writes: > On Jun 8 22:53, Haojun Bao wrote: >> >> If you have cd-rom/soft-disk drive, please run the following test case, >> >> for x in {a..z}; do >> if test -e /cygdrive/$x/Windows ; then >>echo "Windows foun

Re: bash `test -e' problem with cdrom drive and soft-disk drive

2009-06-08 Thread Haojun Bao
Corinna Vinschen writes: > On Jun 8 22:53, Haojun Bao wrote: >> >> If you have cd-rom/soft-disk drive, please run the following test case, >> >> for x in {a..z}; do >> if test -e /cygdrive/$x/Windows ; then >>echo "Windows foun

Re: Garbage man pages

2009-06-12 Thread Haojun Bao
Dave Korn writes: > Bill McCormick wrote: >> Bill McCormick wrote: >>> Bill McCormick wrote: Hello, There's something wrong with my man pager; it's producing garbage output. My ~/.bashrc has these entries: export MANPAGER='less -isrR' export PAGER='less -r'

job control "Bad address" error

2009-06-16 Thread Haojun Bao
hi, I searched the mail list for job control and didnot see my issue, and I can reproduce it both at work and at home: type the command: cat|cat type ^Z, type bg or fg And it will display cat: -: Bad address Could you please try to reproduce it? -- Unsubscribe info:

Re: Garbage man pages

2009-06-17 Thread Haojun Bao
Dave Korn writes: > > I said I'd check: there doesn't seem anything wrong with the packaging, > which hasn't changed in a couple of years now; the most likely thing is that > you and Bao experienced some kind of failure during running the postinstall > scripts. Checking the log files /var/log/

Re: Garbage man pages

2009-06-17 Thread Haojun Bao
Dave Korn writes: > > I said I'd check: there doesn't seem anything wrong with the packaging, > which hasn't changed in a couple of years now; the most likely thing is that > you and Bao experienced some kind of failure during running the postinstall > scripts. Checking the log files /var/log/

find(1) assertion for folder with a sub-folder named `x:'

2009-06-19 Thread Haojun Bao
hi, Here's a test case to make find(1) assertion: mkdir no-such-dir/foo/bar: -p #this will not assert find no-such-dir/ mkdir no-such-dir/foo/c: -p #this will assert now find no-such-dir/ #this wil not assert cd no-such-dir/foo/; find .; cd - #this

Switched back to cygwin EMACS from EMACS for win32

2009-06-23 Thread Haojun Bao
(This is not a bug report for cygwin or Emacs, it's more like a story). Long time ago, I used old cygwin EMACS, 21.x version, but I found it crashes now and then, so I struggled til I found native EMACS 23 beta is provided at (*) (*) http://ourcomments.org/cgi-bin/emacsw32-dl-latest.pl. I went

Re: find(1) assertion for folder with a sub-folder named `x:'

2009-06-23 Thread Haojun Bao
"Phil Betts" writes: > Corinna Vinschen wrote: >> On Jun 19 17:55, Haojun Bao wrote: >> > hi, >> > >> > Here's a test case to make find(1) assertion: >> > >> > mkdir no-such-dir/foo/bar: -p >> > >> >

Re: commanline argument parsing

2009-06-30 Thread Haojun Bao
grischka writes: > If I compile this snippet: > > #include > int main (int argc, char **argv) > { > int i; > for (i = 0; i < argc; ++i) > printf("argv[%d] %s\n", i, argv[i]); > return 0; > } > > with cygwin GCC and then run it from CMD prompt: > > C:\cygwin\home\me> test

`run emacs' in win32 console cause bad emacs performance

2009-07-02 Thread Haojun Bao
hi, When I start emacs (alternated to emacs-X11) with `run emacs' on the Windows console (started with the Cygwin.bat shortcut), the emacs performance is not good (moving the cursor up/down is not smooth), and not stable (hang/crash sometimes). But if started directly with `emacs' or from the St

Re: `run emacs' in win32 console cause bad emacs performance

2009-07-03 Thread Haojun Bao
procmon.tgz Description: application/tar-gz -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple

Re: `run emacs' in win32 console cause bad emacs performance

2009-07-04 Thread Haojun Bao
Ken Brown writes: > On 7/3/2009 12:43 PM, Haojun Bao wrote: > [empty message with attachment] > > Was this supposed to be a reply to my request for more information? > I'll repeat what I said: > >> I can't reproduce this, but you haven't really given en

Re: `run emacs' in win32 console cause bad emacs performance

2009-07-04 Thread Haojun Bao
Haojun Bao writes: > Ken Brown writes: > >> On 7/3/2009 12:43 PM, Haojun Bao wrote: >> [empty message with attachment] >> >> Was this supposed to be a reply to my request for more information? >> I'll repeat what I said: >> >>> I can'

lftp depency packages not auto-selected

2009-07-21 Thread Haojun Bao
Run Cygwin setup-1.7.exe for the first time, select lftp explicitly, the basic system is just "Default". After installation complete, start lftp fails, first will complain libexpat missing. After install libexpat, lftp will again complain libstdc++ missing. -- Problem reports: http://cygw

Emacs w3m `w3m-toggle-inline-images' cause segfault

2009-07-21 Thread Haojun Bao
Here's how to reproduce it: 1. install w3m-el 2. start Xwin, and then start emacs with: emacs.exe -q -l ~/1.el 3. Press M-x w3m in emacs to start w3m 4. Press g in *w3m* buffer, type http://www.cnn.com/ (I use this URL because it contains many images. A site with few images will not reproduc

Re: Emacs w3m `w3m-toggle-inline-images' cause segfault

2009-07-22 Thread Haojun Bao
Ken Brown writes: > On 7/21/2009 10:22 PM, Haojun Bao wrote: >> Here's how to reproduce it: >> >> 1. install w3m-el >> >> 2. start Xwin, and then start emacs with: >>emacs.exe -q -l ~/1.el > > Cygwin's emacs-*-23.0.92-10 packages don&#

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

2009-07-26 Thread Haojun Bao
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) (setq num (+ num 1)) (message "num is %d" num) (start-process "hello" nil "/usr/bin

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

2009-07-27 Thread Haojun Bao
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) > (setq num (+ num 1)) >

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 g

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

2009-07-29 Thread Haojun Bao
Christopher Faylor writes: > On Tue, Jul 28, 2009 at 10:52:44AM +0800, Haojun Bao wrote: >>I have debugged it again, and I think I have more clue. I have read the >>how-cygheap-works.txt, and this might be a known problem. >> >>It's because the cygheap space has b

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

2009-07-29 Thread Haojun Bao
Christopher Faylor writes: > On Wed, Jul 29, 2009 at 03:32:28PM +0800, Haojun Bao wrote: >>> >>> Not necessarily. We don't expect these functions to return NULL. It >>> would be interesting to know how many fds are open at this point. If it >>> i

Re: How cygwin realize posix pipe?

2009-07-30 Thread Haojun Bao
Tatsuro MATSUOKA writes: > Hello > > I have involved in the octave project. > Octave uses gnuplot as a graphic backend and data are sent and recieved via > pipe. > > A report of slowness issue of the plot on octave on windows reported. So one of your program is native and the other cygwin. It

avira (http://www.avira.com/) should be added to BLODA?

2009-08-12 Thread Haojun Bao
Hi, Avira will cause findutils configure take a lng time. And I doubt many other anti-virus software will cause problems here. I tried to build findutil, the `configure' hangs (but not really) when testing long file name. I checked the conftest.c to see where it seemed to hang. At the end of

Re: avira (http://www.avira.com/) should be added to BLODA?

2009-08-12 Thread Haojun Bao
Dave Korn writes: > Haojun Bao wrote: >> Hi, >> >> Avira will cause findutils configure take a lng time. And I doubt >> many other anti-virus software will cause problems here. > > Hmm, it turns out it's already there since we had a similar report

Misc programs/scripts/config files I wrote

2009-08-13 Thread Haojun Bao
When I update/build cygwin, I must make sure to kill all cygwin processes, or I will be required to reboot. So I just wrote a script using win32 native python to terminate all process that has cygwin1.dll loaded: terminateModule.py cygwin1.dll Sadly, I can't simply post the .py file out, bec

Re: Misc programs/scripts/config files I wrote

2009-08-13 Thread Haojun Bao
"Larry Hall (Cygwin)" writes: > On 08/13/2009 05:27 AM, Haojun Bao wrote: >> >> When I update/build cygwin, I must make sure to kill all cygwin >> processes, or I will be required to reboot. > > > > Your reference to "build" doesn't mak

find(1) memory leak in cygheap

2009-08-19 Thread Haojun Bao
I found this problem when running updatedb, the find will print 2 [main] find 2592 C:\cygwin\bin\find.exe: *** fatal error - cmalloc would have returned NULL I have dumped the cygheap using gdb to see what's in it, the size is about 25M, and I use strings.exe to examine the strings in it, a

Re: find(1) memory leak in cygheap

2009-08-19 Thread Haojun Bao
On Wed, Aug 19, 2009 at 11:04 PM, Haojun Bao wrote: > On Wed, Aug 19, 2009 at 10:03 PM, Christopher > Faylor wrote: >> On Wed, Aug 19, 2009 at 07:47:37PM +0800, Haojun Bao wrote: >>>I found this problem when running updatedb, the find will print >>> >>>

Re: find(1) memory leak in cygheap

2009-08-20 Thread Haojun Bao
On Thu, Aug 20, 2009 at 4:39 PM, Corinna Vinschen wrote: > On Aug 20 14:09, Haojun Bao wrote: >> I have done some debugging, and the culprit should be dup(2) syscall. >> Here's another test case, this time written in C. >> >> Note that the cygheap_start and cyghe

bar and bar.exe under same folder and cygwin-svn version control (don't do that!)

2009-09-27 Thread Haojun Bao
This might turn out a big surprise for the unwary (and unwise, like me), who put `bar' and `bar.exe' in the same folder, under svn version control. `bar' is a Linux binary, `bar.exe' is for Winows. Now, if you `rm bar' (for some reason), and modify `bar.exe', then do a `svn ci', you will see both

Re: Many Cygwin (mintty) windows - How to close all?

2009-10-10 Thread Haojun Bao
Arun Biyani writes: > Chris Sutcliffe wrote: Is there some sort of Cygwin command that - 1. Closes all Mintty windows 2. Unloads services - such as cron 3. Exits X server in short, gets rid of all Cygwin processes so I can update & restart without having to do

Re: Many Cygwin (mintty) windows - How to close all?

2009-10-10 Thread Haojun Bao
Dave Korn writes: > Haojun Bao wrote: > >> The C# .net programming ... > > Yeh. Or you could just use the cygwin native tools from the procps package, > which have the advantage of not having to install hundreds of megabytes of MS > bloatware. You don't need to

Re: CYGWIN_NT-5.1 1.7.0(0.214/5/3) ps (cygwin) 1.11 - how do I display the arguments to the processes?

2009-11-18 Thread Haojun Bao
Chris January writes: > > Install the procps package and then use the procps command. > You can also try WMIC which comes with Windows, on XP in my case. If you need for e.g., PID/PPID/CMDLINE, especially if you need see Windows native processes and if procps can't do that (I don't know if it ca

emacsclient.exe won't exit (was: Re: [1.7] Updated: cygwin-1.7.0-65)

2009-11-22 Thread Haojun Bao
Hi, Corinna Vinschen writes: > > Nver mind. With the help of your testcase I found the problem. I'll > apply a fix shortly, but I have to think about it some more first. > After upgrade to -65 cygwin.dll, emacsclient.exe won't exit, no matter if the --no-wait option is added. There's a sock

Re: Cygwin Performance and stat()

2010-06-06 Thread Haojun Bao
Dave Korn writes: > On 04/06/2010 18:33, Christopher Wingert wrote: >>> [quit top-posting] >> >> Now you are my mom too? > > No, I am. Now quit playing with all your new friends and > dinner! > > cheers, > Your Mom OK. I'm a Chinese, and I'm laughing out loud with this one. http:/

Re: One final time

2010-06-06 Thread Haojun Bao
Laugh out loud rolling in bed can not fall asleep. cyf, you must be BOFH! This guy wanted to send a private email to the "leader", and now complains because the leader drags him back into the mailing list... On Mon, Jun 7, 2010 at 12:05 AM, Christopher Wingert wrote: > > Just FYI, just to be c