Re: how to avoid error dialog during app crash when non-interactive

2006-02-06 Thread Brian Dessent
Hans Horn wrote:

> I have an app build with gcc -mno-cygwin, that constantly bombards me with
> error dialogs as shown in the attachment.
> The app is meant to run non-interactively.
> Is there a way to compile the app differently so error notifications get
> simply printed out rather than being presented via dialog?

First of all, you're using the mingw compiler when you use -mno-cygwin,
so you should ask on the mingw list.  This has little to do with Cygwin.

But I don't think there's a lot you can do about this other than
obviously fixing your bugs that are causing the faults.  When you use
mingw you are using the Microsoft C runtime library (MSVCRT) and it sets
up its the fault hander which is what is showing the above dialog.  So I
don't think you have any control in that aspect.

I suppose you could try installing your own handler in the SEH chain
that would catch the access violation and handle it in some way.  If you
were using MSVC you could just use _try/_except but unfortunately gcc
does not support this, so you would have to do it manually.  (Is there a
set of macros out there somewhere that eases this?)  You'll have to
consult MSDN or google for more details there, not exactly on topic for
this list since Cygwin does exception handling in the posix way.  A
starting point is
.

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: Cygwin 1.5.19 breaks my app

2006-02-06 Thread vita
I have got to a similar problem with Cygwin having same symptoms. I have found
that there was a reported problem with a strings in libstdc++.la, if your
application is using dlls. It is really awfull bug to identify...

See this links for details:
http://sourceware.org/ml/cygwin/2006-01/msg01352.html
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24196

I got around by compiling gcc-4.0.2 with extra flag
--enable-fully-dynamic-string and I will later use a new string implementation
that should come with gcc-4.1.

PV




Sent through the University of Leoben webmail system


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



gdb hangs

2006-02-06 Thread Vitaly Provodin
I am trying to debug Win32 dll.
Actually, I exercised setting breakpoint in dynamically loaded libraries and
used the pending breakpoints feature of gdb. It properly works on Linux but
on Windows I get the promising start message "Starting program:…" and
gdb successfully hangs.

Here is a log of gdb session:
-8<-
$ gdb dlcheck.exe
GNU gdb 6.3.50_2004-12-28-cvs (cygwin-special)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-cygwin"...
(gdb) r
Starting program: /cygdrive/c/dllcheck/dlcheck.exe
-8<-

It could be interrupted only by killing the gdb process.

Here is the source file of the application (dlcheck.c)
===
#include 
#include 
#include 

int main(int argc, char **argv) {
void *handle;
void (*helloworld_func)();
char *error;

handle = dlopen("./helloworld.dll", RTLD_NOW);
if (!handle) {
fprintf(stderr, "%s\n", dlerror());
exit(1);
}

dlerror();  /*Clear any existing errors */
*(void**)(&helloworld_func) = dlsym(handle, "helloworld");
if ((error = dlerror()) != NULL) {
fprintf(stderr, "%s\n", error);
exit(1);
}

(*helloworld_func)();
dlclose(handle);
return 0;
}
===

Here is the source file of the dll (helloworld.c)
===
#include 

void helloworld(void) {
printf("Hello, world!\n");
}
===

Here is make file
===
all: dlcheck.exe helloworld.dll

dlcheck.exe: dlcheck.o
@echo 'Building target: $@'
@echo 'Invoking: GCC C Linker'
gcc  -odlcheck.exe dlcheck.o
@echo 'Finished building target: $@'
@echo ' '

dlcheck.o:  dlcheck.c
@echo 'Invoking: GCC Compiler'
gcc  -g -c dlcheck.c
@echo 'Finished building target: $@'
@echo ' '

helloworld.dll: helloworld.o
@echo 'Building target: $@'
@echo 'Invoking: GCC C Linker'
gcc  -shared -ohelloworld.dll helloworld.o helloworld.def
@echo 'Finished building target: $@'
@echo ' '

helloworld.o:   helloworld.c
@echo 'Invoking: GCC Compiler'
gcc  -g -c helloworld.c
@echo 'Finished building target: $@'
@echo ' '

clean:
rm -rf dlcheck.exe dlcheck.o helloworld.dll helloworld.o
[EMAIL PROTECTED] ' '
===

Thanks in advance,
Vitaly Provodin

Cygwin Configuration Diagnostics
Current System Time: Mon Feb 06 17:11:01 2006

Windows XP Professional Ver 5.1 Build 2600 Service Pack 2

Path:   C:\cygwin\usr\local\bin
C:\cygwin\bin
C:\cygwin\bin
C:\cygwin\usr\X11R6\bin
c:\PROGRAM FILES\THINKPAD\UTILITIES
c:\WINNT\system32
c:\WINNT
c:\WINNT\System32\Wbem
c:\Program Files\PC-Doctor for Windows\services
c:\Program Files\ATI Technologies\ATI Control Panel
c:\Program Files\ATI Technologies\Fire GL 3D Studio Max
c:\PROGRA~1\F-Secure\ssh
.\
C:\cygwin\bin
c:\Perl\Bin
c:\user\vitp\bin\
.\
c:\Program Files\cvsnt

Output from C:\cygwin\bin\id.exe (nontsec)
UID: 44855(vprovodi)GID: 10544(mkgroup-l-d)
0(root) 544(Administrators) 1013(Debugger Users)
10544(mkgroup-l-d)

Output from C:\cygwin\bin\id.exe (ntsec)
UID: 44855(vprovodi)GID: 10544(mkgroup-l-d)
0(root) 544(Administrators) 1013(Debugger Users)
10544(mkgroup-l-d)

SysDir: C:\WINNT\system32
WinDir: C:\WINNT

USER = `vprovodi'
TCL_LIBRARY = `C:\Cygwin\usr\share\tcl8.0'
GCC_EXEC_PREFIX = `C:\Cygwin\lib\gcc-lib\'
PWD = `/cygdrive/c/dllcheck'
HOME = `/cygdrive/c/Documents and Settings/vprovodi'
MAKE_MODE = `unix'

WSADMINTOOLS = `ec\sir4.0\site\nnec_akl\Client\AdminTools'
HOMEPATH = `\Documents and Settings\vprovodi'
APPSDRIVE = `x:'
MANPATH = `/usr/local/man:/usr/share/man:/usr/man::/usr/ssl/man'
APPDATA = `C:\Documents and Settings\vprovodi\Application Data'
HOSTNAME = `vprovodi-mobl'
VS71COMNTOOLS = `C:\Program Files\Microsoft Visual Studio .NET 
2003\Common7\Tools\'
ENSCRIPT_LIBRARY = `C:\Cygwin\usr\share\enscript'
BUILDDOMAIN = `CCR'
NOINVSMS = `Yes'
TERM = `cygwin'
PROCESSOR_IDENTIFIER = `x86 Family 6 Model 13 Stepping 6, GenuineIntel'
WINDIR = `C:\WINNT'
EMACSDATA = `C:\Cygwin\usr\share\emacs-21.1\etc'
WSSITE = `NNEC_AKL'
TK_LIBRARY = `C:\Cygwin\usr\share\tk8.0'
TIX_LIBRARY = `C:\Cygwin\usr\share\tix4.1'
OLDPWD = `/cygdrive/c/user/vitp/ws_examples/dllcheck'
EMACSPATH = `C:\Cygwin\bin'
USERDOMAIN = `CCR'
OS = `Windows_NT'
ALLUSERSPROFILE = `C:\Documents and Settings\All Users'
EMACSLOCKDIR = `C:\WINNT\TEMP\LOCK'
ECCLIENT = `SIR4.0'
TEMP 

Cygwin fork implementation

2006-02-06 Thread Sudhahar
Hi,
   In Cygwin fork code the statement

int res = setjmp (grouped.ch.jmp);
  if (res)
res = fork_child (grouped.ch.parent, grouped.first_dll, grouped.load_dlls);
  else
res = fork_parent (grouped.ch.parent, grouped.first_dll,
grouped.load_dlls, esp, grouped.ch);

avoids the fork being called repeatedly by the created process of
parent. Can anyone tell me how this actually happens. Thanks in
advance for your time and comments.

Thanks
Sudhakar

--
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: Prompt issue within cygwin

2006-02-06 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


According to Eric Blake on 1/24/2006 7:12 AM:
> 
> Shoot - the bug is still not fixed upstream; I reproduced it with
> bash-3.1-1, readline-5.1-1, and rxvt-2.7.10-6.  One of these days, I hope
> to be able to sit down and figure out where readline is going wrong (it is
> either a readline bug, or a bug in the terminfo database), but it is
> painful to debug.
> 
> 
>>>There is a prompt bug in bash that causes it to miscount the number of
>>>displayed characters.  One workaround was to append '\[\]' to PS1.  Also,
>>>a good habit to get into is to use single quotes in the shell when some
>>>value contains backslashes.
> 
> 
> Unfortunately, appending \[\] to PS1 no longer works with readline-5.1,
> since upstream "fixed" readline to recognize that an empty non-printing
> sequence has no effect on the location of the last non-printing character.
>  However, I think I might be able to recussitate my readline-5.0 hack that
> forcefully treats a single-line prompt with non-printing characters as
> though it had a \[\] appended (and I hope I can make it work at a lower
> level then where empty \[\] is stripped from PS1).  It may be a while, but
> I plan on providing readline-5.1-2 that works around this nasty prompt bug
> as soon as I can.

Chet Ramey, the upstream readline maintainer, FINALLY admitted that his
routines have display bugs when readline is compiled with multi-byte
support, and when a single-line prompt contains invisible characters.  The
problem stems from the fact that there is no reliable way to determine
which column the cursor is currently in, so readline makes some
assumptions that the prompt always starts in column 0 (which is not always
valid):

http://lists.gnu.org/archive/html/bug-bash/2006-02/msg00018.html

Hopefully Chet holds true to his promise and makes readline 5.2 better at
this (although given the history of his past releases, it will be more
than a year away; and he doesn't post his development version control
system online, so the rest of the world is stuck waiting).

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

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

iD8DBQFD51Bs84KuGfSFAYARAiSRAKCBFofaa8FV/jyN8W4PKq3AgQgfmQCgkc31
Majon+acNYsS90u8ox38rG0=
=Grxu
-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: gdb hangs

2006-02-06 Thread Brian Dessent
Vitaly Provodin wrote:

> I am trying to debug Win32 dll.
> Actually, I exercised setting breakpoint in dynamically loaded libraries and
> used the pending breakpoints feature of gdb. It properly works on Linux but
> on Windows I get the promising start message "Starting program:…" and
> gdb successfully hangs.

Hmm, interesting.  Gdb is not actually hung -- it has encoutered an
error and has prompted the user "Do you wish to continue, y/n" but you
don't see that because output at that point is temporarily redirected to
/dev/null.  But if you press y it will try to continue, but it
hits the same snag again, and things just go downhill from there.  You
can see this illustrated much more clearly if you use insight, as the
prompts are properly displayed.

The actual source of the problem is the SECT_OFF_DATA macro around line
910 in coffread.c.  I'm not sure exactly what's broken here, but it
seems like it might be related to the fact that (at least on my system)
the DLL gets assigned the default image base and has to be relocated and
ends up loading very low in memory at 0x003f.  If you enable auto
image basing (add -Wl,--enable-auto-image-base to the link line) you get
a DLL that loads much higher and doesn't require relocation, and
everything works fine.

You might want to take this up on the gdb list, although since both
Corinna and cgf read both lists this is probably not necessary.

By the way, this is pretty bad C:

> *(void**)(&helloworld_func) = dlsym(handle, "helloworld");

This will give you a warning at -O2 because it violates the language's
aliasing rules.  That kind of thing can really bite you later.  I think
you really ought to use something like:

   helloworld_func = (void (*)()) dlsym(handle, "helloworld");

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: Cygwin fork implementation

2006-02-06 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

According to Sudhahar on 2/6/2006 5:33 AM:
> Hi,
>In Cygwin fork code the statement
> 
> int res = setjmp (grouped.ch.jmp);
>   if (res)
> res = fork_child (grouped.ch.parent, grouped.first_dll, 
> grouped.load_dlls);
>   else
> res = fork_parent (grouped.ch.parent, grouped.first_dll,
> grouped.load_dlls, esp, grouped.ch);
> 
> avoids the fork being called repeatedly by the created process of
> parent. Can anyone tell me how this actually happens. Thanks in
> advance for your time and comments.

If you are asking how setjmp works, it is not cygwin specific.  Any good
systems C programming book should give you more details, or you can read
what POSIX says:
http://www.opengroup.org/onlinepubs/009695399/functions/setjmp.html.

setjmp() is one of those MAGIC functions, that when paired with the
longjmp() in fork_parent(), returns 2 distinct values at different points
during execution.

You may also be interested in
http://cygwin.com/cgi-bin/cvsweb.cgi/src/winsup/cygwin/how-cygheap-works.txt?rev=1.5&content-type=text/x-cvsweb-markup&cvsroot=src

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

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

iD8DBQFD51Z484KuGfSFAYARAvXNAJ0cgMN8AqYiOFeY7oVKQcHe5EvJ/ACgpFfU
l4KjZDRVF39JKEI41g/mYAc=
=yYHr
-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: 1.5.19+: symlink bug

2006-02-06 Thread Corinna Vinschen
On Feb  3 22:59, Corinna Vinschen wrote:
> On Feb  3 16:29, Eric Blake wrote:
> > > > behavior is the same, and it is cygwin doing it.  It appears that when
> > > > both TESTLINK.lnk and TESTLINK.exe.lnk exist, lstat("TESTLINK")
> > > > is picking up the contents of TESTLINK.exe.lnk rather than the
> > > > contents of TESTLINK.lnk.
> > > 
> > > I have prepared a patch which eliminates this problem, and I'll apply it
> > > soon, but nevertheless, I'm not exaclty happy with coreutils symlink
> > > handling.  If a TESTLINK exist, it shouldn't allow to create a
> > > TESTLINK.exe symlink, really.
> > 
> > I don't know - on Linux, you can have both TESTLINK and
> > TESTLINK.exe in the same directory, whether or not either file
> > is an actual file or a symlink.  There definitely needs to be a
> 
> The difference her is the special meaning of .exe under Windows.  If you
> have an executable "foo" under Linux, it's called "foo".  Under Windows
> it's called "foo.exe" and unfortunately there's still room left to
> create an entirely unrelated file "foo".  But if both files have the
> executable bit set, which one to execute if the user calls "foo"?
> There's an unwanted ambiguity here.  Not that I want to push the problem
> to coreutils, but I think in the long run, Cygwin should refuse to
> create a file "foo" if "foo.exe" is present and vice versa.  The same
> goes for "foo.lnk".  All three filenames, "foo", "foo.exe", "foo.lnk"
> are in our virtual POSIX reality denoting one and the same file "foo",
> just cluttered with Windows naming convention ambiguity.  What we want
> from the POSIX perspective is ideally only one file "foo" per directory,
> isn't it?
> [...]
> The idea is just simply to add automatic .exe handling to functions
> which are not doing this so far, because it has been thought of as "too
> dangerous".  I'm talking about open(2), link(2), rename(2), unlink(2),
> basically.  You're right, symlink(2) would be another candidate which I
> forgot so far (*making mental note*).  The result is in some way what I
> outlined above.  Consider a link("foo", "bar") in a directory in which a
> file bar.exe already exists.  Without transparent .exe handling, link
> would create a hardlink called "bar".  With transparent .exe handling
> the link function would encounter the existance of a file "bar.exe" and
> refuse to create the symlink with EEXIST.

If you want to give it a try, I added the experimental "transparent_exe"
option to $CYGWIN.  The functions behaving differently are

- open("foo") opens "foo.exe" if it exists, but "foo" doesn't.
- rename("foo", "bar") will rename foo.exe to bar.exe.
- unlink("foo") will unlink foo.exe
- link, symlink will ... yes, right.
- pathconv("foo") will report on foo.exe.
- realpath will only append the .exe suffix if transparent_exe is not
  set.
- /proc/$PID/exe{name} will only keep the .exe suffix if transparent_exe
  is not set.

That's it so far.  Keep in mind that this is experimental and will
stay experimental for some time, so there's no good reason to rip the
extra CYGWIN functionality from coreutils right now ;-)

Bugs in the transparent_exe handling won't be a showstopper for a Cygwin
release, but I would appreciate some relaxed testing and bug reporting.

Don't use this option on production systems, though.


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/



List posting (Was Re: fwilson00hotmail.com)

2006-02-06 Thread Igor Peshansky
On Mon, 6 Feb 2006, Fred Wilson wrote:

> Apologies for the intrusion.
>
> I have signed up for teh cygwin mailing list and am currently getting
> list emails.
>
> However, none of the message I authr and send to the list at
> cygwincygwin.com are making it to the list. (I neither see them in my
> inbox mailed back nor do I see them in the mailing list archives.)
>
> As you seem to be a frequent contributor and as I could not find an
> email address to email to for problems regarding the list, i was
> wondering if you might have any ideas how I would go about getting my
> messages published ot the list.
>
> As a troubleshooting step, after the first three messages had not posed,
> I send a simple "test" message with this as the subject line and body
> text.  This message was caught by the list's spam filter and i received
> a reply as such, therefore the message ARE making it to the server.
>
> Once again, any help woudl be greatly appreciated.

Fred,

I'm Cc'ing my reply to the list.  I'm sure others will have more to say,
but if you read the rejection message from the SPAM filter carefully, it
will say that this list rejects HTML email.  So, set your mailer to send
plain text mail.  Before you ask, I don't know how to do this for Hotmail,
but I know it's possible as there are other posters on this list with
Hotmail addresses.

Also,  before posting, and it's not
a good idea to put raw email addresses in your emails (especially someone
else's addresses).
HTH,
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED] | [EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_Igor Peshansky, Ph.D. (name changed!)
 |,4-  ) )-,_. ,\ (  `'-'   old name: Igor Pechtchanski
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"

--
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: Prompt issue within cygwin

2006-02-06 Thread Zach Gelnett
>Chet Ramey, the upstream readline maintainer, FINALLY admitted that his
>routines have display bugs when readline is compiled with multi-byte
>support, and when a single-line prompt contains invisible characters.  The
>problem stems from the fact that there is no reliable way to determine
>which column the cursor is currently in, so readline makes some
>assumptions that the prompt always starts in column 0 (which is not always
>valid):
>
>http://lists.gnu.org/archive/html/bug-bash/2006-02/msg00018.html
>
>Hopefully Chet holds true to his promise and makes readline 5.2 better at
>this (although given the history of his past releases, it will be more
>than a year away; and he doesn't post his development version control
>system online, so the rest of the world is stuck waiting).

Interesting, so, based on my reading of this, if i were to recompile
readline without multi-byte support it should resolve this problem?

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



default PATH

2006-02-06 Thread jt
I upgrade to 1.5.19-4 and my default PATH has changed:

PATH is "inherited" from my WinXP environment as usual but it is not
prepend with "/bin" like before the upgrade, and is now appended with
".".
I cannot find where this happen (my .bashrc is unchanged).

Also, when I start cygwin (shell in rxvt), it throws me in "/usr/bin"
(which is a mount of "/bin") instead of my usual "~/".

I can fix all this by hand in my .bashrc but I want to have a clean
fix (avoid cygwin to do the bad job at the first place).
Can someone tell me where to look at?

Note: the upgrade also updated coreutils, readline and other minor stuff.

--
jt


Re: Issue, most possibly with new Readline

2006-02-06 Thread Eric Blake
> After installing the latest readline updates (that fixed the earlier
> prompt issue) I'm finding an issue with the vi command line interface.
> 
> Basically, when I hit [ESC] then fwd slash (/) to search through the
> history, it throws my cursor back to get beginning of the line (on top
> of the prompt) and acts weird.  This is in mrxvt, now if I do the same
> in the basic cygwin bash shell i get this:
> 
> [EMAIL PROTECTED] ~> / 
> ☺☺☺☺☺☺☺☺☺☺☺☺☺☺☺☺☺☺☺☺☺☺☺☺☺

I could not reproduce this with a quick check (I normally
use set -o emacs, so I am practically clueless about
vi mode).  Also, I normally use a multiline prompt, which
may be impacting things.  I tried:

$ echo $PS1
\[\e]0;[EMAIL PROTECTED] \ \[\e[35m\](${PIPESTATUS[*]}) \[\e[33m\]~\[\e[0m\]\n\$
[EMAIL PROTECTED] (0) ~
$ echo hi
hi
[EMAIL PROTECTED] (0) ~
$ [ESC]/e[ENTER]   # those four keystrokes rewrite this line as:
$ echo hi # with the cursor on the e


What is your PS1?  What settings do you have in your ~/.inputrc?

One other thing to be aware of - readline 5.1 official patch 2
was released this weekend, so I need to make a 5.1-3 cygwin
release soon to incorporate it (it dealt with initialization issues
with line-wrapping).  I don't know if your bug would have been
fixed by official patch 2, or whether I should spend more time
investigating this first.

--
Eric Blake
volunteer cygwin readline maintainer

--
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: default PATH

2006-02-06 Thread Eric Blake
> I upgrade to 1.5.19-4 and my default PATH has changed:
> 
> PATH is "inherited" from my WinXP environment as usual but it is not
> prepend with "/bin" like before the upgrade, and is now appended with
> ".".
> I cannot find where this happen (my .bashrc is unchanged).

Try opening a cmd.com window in c:\cygwin\bin (or whatever
it is named), then running 'bash --login -xv' to see every command
executed by bash during startup.  Maybe that will help you
pinpoint the culprit.

> 
> Also, when I start cygwin (shell in rxvt), it throws me in "/usr/bin"
> (which is a mount of "/bin") instead of my usual "~/".

Sounds like it might be a problem with $HOME, such that
bash does not know where to find your ~/.bashrc.

> 
> I can fix all this by hand in my .bashrc but I want to have a clean
> fix (avoid cygwin to do the bad job at the first place).
> Can someone tell me where to look at?
> 
> Note: the upgrade also updated coreutils, readline and other minor stuff.

Perhaps you also upgraded base-files, and maybe something
in there was the culprit?

Hint: following these directions is a great help to debugging:
> Problem reports:   http://cygwin.com/problems.html

--
Eric Blake
volunteer cygwin bash maintainer

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



Bash Window Geometry

2006-02-06 Thread Bubba Jones
Is it possible to tell the bash prompt where I want it positioned on my 
desktop?  Using X Windows I specify size and location with "--geometry".  Is 
there anything comparable under MS Windows?

_Get your FREE 
Budweiser E-mail account at http://budweiser.com Budweiser E-Mail must be 
used responsibly and only is for consumers 21 years of age and older!   
Disclaimer: Neither Anheuser-Busch, Inc. (the makers of BUDWEISER beer) nor the 
operator of this E-Mail service or their respective affiliates have seen, 
endorsed or approved any of the content in this e-mail and expressly disclaim 
all liability for the content in whole and in part.

--
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: Issue, most possibly with new Readline

2006-02-06 Thread Zach Gelnett
On 2/6/06, Eric Blake <[EMAIL PROTECTED]> wrote:
> > After installing the latest readline updates (that fixed the earlier
> > prompt issue) I'm finding an issue with the vi command line interface.
> >
> > Basically, when I hit [ESC] then fwd slash (/) to search through the
> > history, it throws my cursor back to get beginning of the line (on top
> > of the prompt) and acts weird.  This is in mrxvt, now if I do the same
> > in the basic cygwin bash shell i get this:
> >
> > [EMAIL PROTECTED] ~> /
> > ☺
>
> I could not reproduce this with a quick check (I normally
> use set -o emacs, so I am practically clueless about
> vi mode).  Also, I normally use a multiline prompt, which
> may be impacting things.  I tried:
>
> $ echo $PS1
> \[\e]0;[EMAIL PROTECTED] \ \[\e[35m\](${PIPESTATUS[*]}) 
> \[\e[33m\]~\[\e[0m\]\n\$
> [EMAIL PROTECTED] (0) ~
> $ echo hi
> hi
> [EMAIL PROTECTED] (0) ~
> $ [ESC]/e[ENTER]   # those four keystrokes rewrite this line as:
> $ echo hi # with the cursor on the e
>
>
> What is your PS1?  What settings do you have in your ~/.inputrc?
>
> One other thing to be aware of - readline 5.1 official patch 2
> was released this weekend, so I need to make a 5.1-3 cygwin
> release soon to incorporate it (it dealt with initialization issues
> with line-wrapping).  I don't know if your bug would have been
> fixed by official patch 2, or whether I should spend more time
> investigating this first.
>
> --
> Eric Blake
> volunteer cygwin readline maintainer
>
> --
> 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/
>
>

Eric,

Basically, when using VI as the command line editor the [ESC] puts the
line into command mode (just like pressing [ESC] within VI) then the /
says search (again it's the same command within VI) for whatever you
type next.  So, "/ls" would return the latest command line that
included the letters "ls" and i can then press "n" to get the next
occurrence and "N" to move the opposite direction through the history,
it's quite handy.

Here is my PS1:

 echo $PS1
\[\e]61;[EMAIL PROTECTED]@\H \W>

Here is my .inputrc (i've tried commenting out the whole thing,
commenting out sections and uncommenting sections, nothing seems to
make a difference except emacs/vi):

# the following line is actually
# equivalent to "\C-?": delete-char
"\e[3~": delete-char

# VT
#"\e[1~": beginning-of-line
#"\e[4~": end-of-line

# kvt
#"\e[H": beginning-of-line
#"\e[F": end-of-line

# rxvt and konsole (i.e. the KDE-app...)
"\e[7~": beginning-of-line
"\e[8~": end-of-line
"\eOc": forward-word
"\eOd": backward-word

# VT220
#"\eOH": beginning-of-line
#"\eOF": end-of-line

set keymap vi
set editing-mode vi

# Allow 8-bit input/output
set meta-flag on
set convert-meta off
set input-meta on
set output-meta on
$if Bash
  # Don't ring bell on completion
  set bell-style none
  # or, don't beep at me - show me
  set bell-style visible
  # Filename completion/expansion
  set completion-ignore-case on
  set show-all-if-ambiguous on
  # Expand homedir name
  set expand-tilde on
  # Append "/" to all dirnames
  set mark-directories on
  set mark-symlinked-directories on
  # Match all files
  set match-hidden-files on
$endif


Re: default PATH

2006-02-06 Thread Brett Serkez

> Try opening a cmd.com window in c:\cygwin\bin (or whatever it is
> named), then running 'bash --login -xv' to see every command executed
> by bash during startup.  Maybe that will help you pinpoint the
> culprit.

This really helps understand why it takes so long to open a bash shell,
the login scripts have allot of work to do.  I've noticed that login
time has gotten much better with the latest cygwin dll, looks like id,
hostname and sed processing slow down the login process.

Brett

Brett C. Serkez, Techie


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



Porting from SUN Solaris to Cygwin

2006-02-06 Thread Lerohl, John K
We're porting several hundred SLOCs from a SUN Solaris environment to
Windows XP PCs.  The initial port was done with MKS Toolkit on lab
machines.  We're looking at using Cygwin for cost reasons.  We have a
hundred or so users with desktops outside the lab.  

We're getting an odd error when we try and run some of the Aps on our
"out-of-lab" machines.  These are the more complex, memory intensive
Applications.  They're compiling cleanly with Cygwin, but fail to run.
They return the following error message:

"*** MapViewOfFileEx(0x740, in_h 0x740) failed, Win32 error 6"

We had these applications running under Windows 2000, but over the
holidays, our company upgraded to Windows XP.  Since then - no luck.
We're currently using the MicroSoft 6.0 C-compiler and .NET Framework
SDK v1.1.  The Cygwin version we're using is 1.5.11-1.

Any ideas?

Thanks much.

Jack Lerohl
[EMAIL PROTECTED]
281-226-8506  

  

--
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: Bash Window Geometry

2006-02-06 Thread Igor Peshansky
On Mon, 6 Feb 2006, Bubba Jones wrote:

> Is it possible to tell the bash prompt where I want it positioned on my
> desktop?  Using X Windows I specify size and location with "--geometry".
> Is there anything comparable under MS Windows?

First off, .  Thanks.

Now, if you're starting bash from a shortcut (e.g., the one Cygwin
installation puts on your desktop), you can change shortcut parameters to
put the window anywhere you want (Properties->Layout->Window position).

> Get your FREE Budweiser E-mail account at http://budweiser.com Budweiser

Is this alluding to a '"free" as in "free beer"' software? 'Cause Cygwin
is '"free" as in "free speech"', actually... :-)
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED] | [EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_Igor Peshansky, Ph.D. (name changed!)
 |,4-  ) )-,_. ,\ (  `'-'   old name: Igor Pechtchanski
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"

--
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: Porting from SUN Solaris to Cygwin

2006-02-06 Thread René Berber
Lerohl, John K wrote:

> We're porting several hundred SLOCs from a SUN Solaris environment to
> Windows XP PCs.  The initial port was done with MKS Toolkit on lab
> machines.  We're looking at using Cygwin for cost reasons.  We have a
> hundred or so users with desktops outside the lab.  
> 
> We're getting an odd error when we try and run some of the Aps on our
> "out-of-lab" machines.  These are the more complex, memory intensive
> Applications.  They're compiling cleanly with Cygwin, but fail to run.
> They return the following error message:
> 
> "*** MapViewOfFileEx(0x740, in_h 0x740) failed, Win32 error 6"
> 
> We had these applications running under Windows 2000, but over the
> holidays, our company upgraded to Windows XP.  Since then - no luck.
> We're currently using the MicroSoft 6.0 C-compiler and .NET Framework
> SDK v1.1.  The Cygwin version we're using is 1.5.11-1.
> 
> Any ideas?

Yes, your problem has nothing to do with Cygwin.

If you are using Microsoft's C compiler then the executable produced only
depends on Microsoft's libraries.  That means they should run with or without
Cygwin.

You are looking at the wrong place (and your Cygwin version is ancient).
-- 
René Berber


--
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: Bash Window Geometry

2006-02-06 Thread Bubba Jones
On Mon, 6 Feb 2006 12:13:43 -0500 (EST) Igor Peshansky <[EMAIL PROTECTED]> 
wrote:

> On Mon, 6 Feb 2006, Bubba Jones wrote:

> 

> > Is it possible to tell the bash prompt where I want it positioned on my

> > desktop?  Using X Windows I specify size and location with "--geometry".

> > Is there anything comparable under MS Windows?

> 

> First off, .  Thanks.



I think my mailer might be goofed...  I don't see an option

for that.  I'll fix it the ole fashioned way though with a

manual CR/LF :) .



> Now, if you're starting bash from a shortcut (e.g., the one Cygwin

> installation puts on your desktop), you can change shortcut parameters to

> put the window anywhere you want (Properties->Layout->Window position).



Thanks, but I'm looking for something like the "--geometry"

feature of X.  I want several bash windows on my desktop in

strategic locations when I double-click a .bat.  I'm guessing

that a .bat file can contain several calls to bash with the

geometry pre-defined.  Right now my cygwin.bat file contains:



@echo off

cd \

C:\Cygwin\bin\bash --rcfile /cygdrive/h/.bashrc -i



Is there any way to have the call to bash set geometry?



> > Get your FREE Budweiser E-mail account at http://budweiser.com Budweiser

> 

> Is this alluding to a '"free" as in "free beer"' software? 'Cause Cygwin

> is '"free" as in "free speech"', actually... :-)

>   Igor



Sort of, kinda.  The free beer is always yesterday :) ...



> -- 

>   http://cs.nyu.edu/~pechtcha/

>   |\  _,,,---,,_  [EMAIL PROTECTED] | [EMAIL PROTECTED]

> ZZZzz /,`.-'`'-.  ;-;;,_  Igor Peshansky, Ph.D. (name changed!)

>  |,4-  ) )-,_. ,\ (  `'-' old name: Igor Pechtchanski

> '---''(_/--'  `-'\_) fL   a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

> 

> "Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."

> "But no -- you are no fool; you call yourself a fool, there's proof enough in

> that!" -- Rostand, "Cyrano de Bergerac"

> 

> --

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

_Get your FREE 
Budweiser E-mail account at http://budweiser.com Budweiser E-Mail must be 
used responsibly and only is for consumers 21 years of age and older!   
Disclaimer: Neither Anheuser-Busch, Inc. (the makers of BUDWEISER beer) nor the 
operator of this E-Mail service or their respective affiliates have seen, 
endorsed or approved any of the content in this e-mail and expressly disclaim 
all liability for the content in whole and in part.

--
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: Bash Window Geometry

2006-02-06 Thread Igor Peshansky
On Mon, 6 Feb 2006, Bubba Jones wrote:

> On Mon, 6 Feb 2006 12:13:43 -0500 (EST) Igor Peshansky <[EMAIL PROTECTED]> 
> wrote:

While you're at it, .  Thanks.

> > On Mon, 6 Feb 2006, Bubba Jones wrote:
> >
> > > Is it possible to tell the bash prompt where I want it positioned on
> > > my desktop?  Using X Windows I specify size and location with
> > > "--geometry". Is there anything comparable under MS Windows?
> >
> > First off, .  Thanks.
>
> I think my mailer might be goofed...  I don't see an option for that.
> I'll fix it the ole fashioned way though with a manual CR/LF :) .

Good enough. :-)  You might want to complain to Anheuser-Busch about this
and the quoting, though...

> > Now, if you're starting bash from a shortcut (e.g., the one Cygwin
> > installation puts on your desktop), you can change shortcut parameters
> > to put the window anywhere you want (Properties->Layout->Window
> > position).
>
> Thanks, but I'm looking for something like the "--geometry"
> feature of X.  I want several bash windows on my desktop in
> strategic locations when I double-click a .bat.  I'm guessing
> that a .bat file can contain several calls to bash with the
> geometry pre-defined.

Yeah, I thought of adding that bash itself has no control over its
geometry -- after all, it's just a shell.  The geometry is specified by
the window that contains the shell (be it a console window or an
application window).  There may be a launcher program that sets those
(after all, if a shortcut can do it, there must be a command-line way,
right?), but I don't know of any.

> Right now my cygwin.bat file contains:
>
> @echo off
> cd \
> C:\Cygwin\bin\bash --rcfile /cygdrive/h/.bashrc -i
 
Heh.  Two problems: (a) you're not starting a login shell, and (b) why do
you have /cygdrive/h as your home?  Sounds like your $HOME setting is
inconsistent with your /etc/passwd...

> Is there any way to have the call to bash set geometry?

As I said above, not to bash itself, but there might be a way of
controlling the position of the console window using some Windows means
(maybe a program in the Windows Resource kit?).
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED] | [EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_Igor Peshansky, Ph.D. (name changed!)
 |,4-  ) )-,_. ,\ (  `'-'   old name: Igor Pechtchanski
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"

--
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: Bash Window Geometry

2006-02-06 Thread Reid Thompson
rxvt takes -geometry as a parameter   -- it also provides a much better 
interface than CMD.EXE


--
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: Bash Window Geometry

2006-02-06 Thread Corinna Vinschen
On Feb  6 17:34, Bubba Jones wrote:
> On Mon, 6 Feb 2006 12:13:43 -0500 (EST) Igor Peshansky <[EMAIL PROTECTED]> 
> wrote:
> > On Mon, 6 Feb 2006, Bubba Jones wrote:
> > 
> > > Is it possible to tell the bash prompt where I want it positioned on my
> > > desktop?  Using X Windows I specify size and location with "--geometry".
> > > Is there anything comparable under MS Windows?
> > 
> > First off, .  Thanks.
> 
> I think my mailer might be goofed...  I don't see an option
> for that.  I'll fix it the ole fashioned way though with a
> manual CR/LF :) .
> 
> > Now, if you're starting bash from a shortcut (e.g., the one Cygwin
> > installation puts on your desktop), you can change shortcut parameters to
> > put the window anywhere you want (Properties->Layout->Window position).
> 
> Thanks, but I'm looking for something like the "--geometry"
> feature of X.

If you use rxvt instead of the standard console window, then just try
the -geometry option...


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/



Re: Bash Window Geometry

2006-02-06 Thread Reid Thompson

Reid Thompson wrote:
rxvt takes -geometry as a parameter   -- it also provides a much 
better interface than CMD.EXE




forgot to mention that rxvt will run natively or with X.


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



rxvt readme?

2006-02-06 Thread beau
Hi all,

I'm trying to get rxvt set up on a new install; can't seem to find the
rxvt readme.  I thought it should be in /usr/doc/Cygwin; nothing but
tetex readmes there.  All clues greatly appreciated.

--
Robert Thomas ("beau") Hayes Link
(c)2006ISR http://www.semanticrestructuring.com/
Discussion, News and Chat at http://lawboards.semanticrestructuring.com/
"In dreams one is not tethered to earthly limitations"---G.T.Snail

--
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: rxvt readme?

2006-02-06 Thread beau
Sorry for the noise.  Sending the note triggerred a better google
search string, which in turn led to an archived post from Igor with a
little grep magic that did the trick.

cygcheck -l rxvt | grep README

Cheers,

On 2/6/06, beau <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I'm trying to get rxvt set up on a new install; can't seem to find the
> rxvt readme.  I thought it should be in /usr/doc/Cygwin; nothing but
> tetex readmes there.  All clues greatly appreciated.
>
> --
> Robert Thomas ("beau") Hayes Link
> (c)2006ISR http://www.semanticrestructuring.com/
> Discussion, News and Chat at http://lawboards.semanticrestructuring.com/
> "In dreams one is not tethered to earthly limitations"---G.T.Snail
>


--
Robert Thomas ("beau") Hayes Link
(c)2006ISR http://www.semanticrestructuring.com/
Discussion, News and Chat at http://lawboards.semanticrestructuring.com/
"In dreams one is not tethered to earthly limitations"---G.T.Snail

--
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: rxvt readme?

2006-02-06 Thread Corinna Vinschen
On Feb  6 10:10, beau wrote:
> Hi all,
> 
> I'm trying to get rxvt set up on a new install; can't seem to find the
> rxvt readme.  I thought it should be in /usr/doc/Cygwin; nothing but
> tetex readmes there.  All clues greatly appreciated.

/usr/share/doc?


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/



Latest update trashed my cygwin install

2006-02-06 Thread James Garrison

I updated and when it was running postinstall I got a large number of
"Entry point not found in cygwin1.dll" popups.  Now bash comes up
in /usr/bin instead of my home directory and is badly hosed.
/etc/profile is gone, and all the cygwin directories are missing
from $PATH.

What I'd like to do is reinstall from scratch, but would like
to preserve the list of packages I have installed.  Is there
a simple way to extract a list of installed packages and then
pass that to a new install?

--
James GarrisonAthens Group, Inc.
mailto:[EMAIL PROTECTED]5608 Parkcrest Dr
http://www.athensgroup.comAustin, TX 78731
PGP: RSA=0x92E90A3B DH/DSS=0x498D331C (512) 345-0600 x150



--
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: Issue, most possibly with new Readline

2006-02-06 Thread Zach Gelnett
On 2/6/06, Zach Gelnett <[EMAIL PROTECTED]> wrote:
> On 2/6/06, Eric Blake <[EMAIL PROTECTED]> wrote:
> > > After installing the latest readline updates (that fixed the earlier
> > > prompt issue) I'm finding an issue with the vi command line interface.
> > >
> > > Basically, when I hit [ESC] then fwd slash (/) to search through the
> > > history, it throws my cursor back to get beginning of the line (on top
> > > of the prompt) and acts weird.  This is in mrxvt, now if I do the same
> > > in the basic cygwin bash shell i get this:
> > >
> > > [EMAIL PROTECTED] ~> /
> > > ☺
> >
> > I could not reproduce this with a quick check (I normally
> > use set -o emacs, so I am practically clueless about
> > vi mode).  Also, I normally use a multiline prompt, which
> > may be impacting things.  I tried:
> >
> > $ echo $PS1
> > \[\e]0;[EMAIL PROTECTED] \ \[\e[35m\](${PIPESTATUS[*]}) 
> > \[\e[33m\]~\[\e[0m\]\n\$
> > [EMAIL PROTECTED] (0) ~
> > $ echo hi
> > hi
> > [EMAIL PROTECTED] (0) ~
> > $ [ESC]/e[ENTER]   # those four keystrokes rewrite this line as:
> > $ echo hi # with the cursor on the e
> >
> >
> > What is your PS1?  What settings do you have in your ~/.inputrc?
> >
> > One other thing to be aware of - readline 5.1 official patch 2
> > was released this weekend, so I need to make a 5.1-3 cygwin
> > release soon to incorporate it (it dealt with initialization issues
> > with line-wrapping).  I don't know if your bug would have been
> > fixed by official patch 2, or whether I should spend more time
> > investigating this first.
> >
> > --
> > Eric Blake
> > volunteer cygwin readline maintainer
> >
> > --
> > 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/
> >
> >
>
> Eric,
>
> Basically, when using VI as the command line editor the [ESC] puts the
> line into command mode (just like pressing [ESC] within VI) then the /
> says search (again it's the same command within VI) for whatever you
> type next.  So, "/ls" would return the latest command line that
> included the letters "ls" and i can then press "n" to get the next
> occurrence and "N" to move the opposite direction through the history,
> it's quite handy.
>
> Here is my PS1:
>
>  echo $PS1
> \[\e]61;[EMAIL PROTECTED]@\H \W>
>
> Here is my .inputrc (i've tried commenting out the whole thing,
> commenting out sections and uncommenting sections, nothing seems to
> make a difference except emacs/vi):
>
> # the following line is actually
> # equivalent to "\C-?": delete-char
> "\e[3~": delete-char
>
> # VT
> #"\e[1~": beginning-of-line
> #"\e[4~": end-of-line
>
> # kvt
> #"\e[H": beginning-of-line
> #"\e[F": end-of-line
>
> # rxvt and konsole (i.e. the KDE-app...)
> "\e[7~": beginning-of-line
> "\e[8~": end-of-line
> "\eOc": forward-word
> "\eOd": backward-word
>
> # VT220
> #"\eOH": beginning-of-line
> #"\eOF": end-of-line
>
> set keymap vi
> set editing-mode vi
>
> # Allow 8-bit input/output
> set meta-flag on
> set convert-meta off
> set input-meta on
> set output-meta on
> $if Bash
>   # Don't ring bell on completion
>   set bell-style none
>   # or, don't beep at me - show me
>   set bell-style visible
>   # Filename completion/expansion
>   set completion-ignore-case on
>   set show-all-if-ambiguous on
>   # Expand homedir name
>   set expand-tilde on
>   # Append "/" to all dirnames
>   set mark-directories on
>   set mark-symlinked-directories on
>   # Match all files
>   set match-hidden-files on
> $endif
>
Eric,

I like the two line format and I dont have the issue there so I think
i'll just move over and use a multi line format instead.

Thank you,
Zach


Re: Latest update trashed my cygwin install

2006-02-06 Thread Eric Blake
> I updated and when it was running postinstall I got a large number of
> "Entry point not found in cygwin1.dll" popups.  Now bash comes up
> in /usr/bin instead of my home directory and is badly hosed.
> /etc/profile is gone, and all the cygwin directories are missing
> from $PATH.

The bulk of your errors probably stem from the one single
error of installing while cygwin1.dll was resident in memory;
once the postinstalls fail, then $PATH tends to not be set
up correctly, leading to an inability to find ~/.bashrc and
other useful files.

> 
> What I'd like to do is reinstall from scratch, but would like
> to preserve the list of packages I have installed.

Probably overkill.  You most likely will get by with just
rerunning setup.exe (this time with all cygwin processes
stopped), and reinstalling the packages that failed to
upgrade properly last time.

>  Is there
> a simple way to extract a list of installed packages and then
> pass that to a new install?

Yes - follow these problem reporting hints, including the
one about attaching the output of "cygcheck -svr" as a
text attachment.  You'll notice it contains a list of the
packages installed on your machine, as well as some
hints as to what might have failed during your
installation.

> Problem reports:   http://cygwin.com/problems.html

--
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: Latest update trashed my cygwin install

2006-02-06 Thread James Garrison
Thanks for the reply. 

Reinstalling package 'base-files' seems to have restored normal operation. 


I found the install logs and can rerun the failed postinstall scripts.

One question: Can the installer be fed a list of packages to install,
or otherwise configured with a different default set of selections?
(Wasn't there once a 'cyginstall' package that could be customized?)

--

James GarrisonAthens Group, Inc.
mailto:[EMAIL PROTECTED]5608 Parkcrest Dr
http://www.athensgroup.comAustin, TX 78731
PGP: RSA=0x92E90A3B DH/DSS=0x498D331C (512) 345-0600 x150



--
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: strange cygstart bug with current Cygwin versions

2006-02-06 Thread David Picton
On 2/3/06, Igor Peshansky <[EMAIL PROTECTED]> wrote:
> On Fri, 3 Feb 2006, David Picton wrote:
>
> > I have encountered a strange bug when starting Microsoft Word when it is
> > started by the cygstart command, e.g. "cygstart Index.doc", with the
> > current version of the Cygwin dll.
> >
> > The symptoms are as follows:
> >
> > 1.  Word appears to start normally, and the file can be edited on screen.

[snip]

> > 3.  Attempting to save the file gets no response.  The only way to close
> > the window is to exit without saving!

[snip]

>
> Sounds like an instance of
> ...  Does it work if
> you "cygstart cmd" and then start word from that cmd shell?  If you get
> the same symptoms, please run "set" in that cmd window and compare the
> output with the same in a cmd started via "Start->Run"...

I get the same symptoms, and now I can see what the problem is.  The 
CMD window shows that TEMP and TMP have retained Cygwin-style
pathnames:

TEMP=/cygdrive/c/DOCUME~1/dave/LOCALS~1/Temp
TMP=/cygdrive/c/DOCUME~1/dave/LOCALS~1/Temp

Word works OK if I set TMP to a proper Windows pathname e.g. D:\cygwin\tmp

>
> Do you get the same problem if you use "run winword.exe filename"?  Which
> version of Word are you trying to use?

No.  Everything worked normally when I did the following:

export PATH='/cygdrive/c/program files/microsoft office/office11':"$PATH"
run winword paper1.doc

The problem seems to be specific to commands started by cygstart (with
the current
Cygwin dll) but isn't specific to one version of Word - I've seen it
with both Word 2003
and Word 2000.

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



Best Practice for file ownership and permissions?

2006-02-06 Thread David Arnstein
I frequently encounter problems due to file ownership and permissions
for the "system" files in /usr, /bin, /sbin/ /etc, and so forth.  For
example, when I type
su Administrator
cygwin responds
/usr/bin/su: /bin/bash: Permission denied

I know enough to have done
mkpasswd -l >/etc/passwd
mkgroup -l >/etc/group

My CYGWIN variable is
"ntsec,server"

I use Windows XP and all my filesystems are NTFS.

What is the recommended user.group ownership for the important files
in /bin, /sbin, /usr, /etc, and so on?  What are the recommended
permission bits?
-- 
David Arnstein   
[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: Bash Window Geometry

2006-02-06 Thread Hannu E K Nevalainen
Corinna wrote:
> On Feb  6 17:34, Bubba Jones wrote:
>> On Mon, 6 Feb 2006 12:13:43 -0500 (EST) Igor Peshansky
> <[EMAIL PROTECTED]> wrote:
>>> On Mon, 6 Feb 2006, Bubba Jones wrote:
>>>
 Is it possible to tell the bash prompt where I want it positioned
 on my desktop?  Using X Windows I specify size and location with
 "--geometry". Is there anything comparable under MS Windows?
>>>
>>> First off, .  Thanks.
>>
>> I think my mailer might be goofed...  I don't see an option
>> for that.  I'll fix it the ole fashioned way though with a manual
>> CR/LF :) .
>>
>>> Now, if you're starting bash from a shortcut (e.g., the one Cygwin
>>> installation puts on your desktop), you can change shortcut
>>> parameters to put the window anywhere you want
>>> (Properties->Layout->Window position).
>>
>> Thanks, but I'm looking for something like the "--geometry"
>> feature of X.
>
> If you use rxvt instead of the standard console window, then just try
> the -geometry option...
>
>
> Corinna

 Note that if you have a correctly defined $HOME at the time when you start
rxvt, then you can use the $HOME/.Xdefaults file to define the geometry and
more
(see man rxvt)

e.g. running something that mimics this; (UNTESTED!)

bash 

Re: Best Practice for file ownership and permissions?

2006-02-06 Thread Eric Blake
> I frequently encounter problems due to file ownership and permissions
> for the "system" files in /usr, /bin, /sbin/ /etc, and so forth.  For
> example, when I type
>   su Administrator
> cygwin responds
>   /usr/bin/su: /bin/bash: Permission denied

Not quite the answer to your original question, but re-read:
http://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-setuid
http://cygwin.com/ml/cygwin-announce/2006-01/msg00041.html

/usr/bin/su probably won't work for you, unless you have
granted your current user additional privileges not given
by default Windows installations.  Give us a better example
of where you are getting failures.

Also, the getfacls and setfacls commands may be helpful
in diagnosing permissions problems; not only should you
check the permissions of /, but also of the drive and all
Windows directories leading up to where / is mounted
(usually c:\cygwin).

> What is the recommended user.group ownership for the important files
> in /bin, /sbin, /usr, /etc, and so on?  What are the recommended
> permission bits?

I don't know that any particular configuration is recommended,
other than that if you use setup.exe, on the screen with the
"Install For" radio button, if you choose 'All users (RECOMMENDED)'
instead of 'Just Me', you tend to get the correct permissions
naturally.  In general, everything in /bin and /sbin should be
world readable and world executable, so ownership only
matters for protecting those files from writes.  Some files
in /etc care about permissions, but in general, scripts like
ssh-user-config or cron_diagnose.sh exist to help you with
that.  And the entire /usr subtree is usually world-readable.

One other thing - if the drive is FAT (on Win9x, or on WinNT
without the ntea option), or on FAT32 (regardless of options),
then permissions are faked and it really doesn't matter who
owns files.

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



[ANNOUNCEMENT] New package: httptunnel-3.3 -- Tunnel data stream in HTTP requests

2006-02-06 Thread Jari Aalto

PACKAGE DESCRIPTION
===

Home page: http://www.nocrew.org/software/httptunnel.html
License  : GPL

Creates a bidirectional virtual data stream tunnelled in HTTP
requests. The requests can be sent via a HTTP proxy if so desired.
This can be useful for users behind restrictive firewalls. If WWW
access is allowed through an HTTP proxy, it's possible to use
httptunnel and, say, telnet or PPP to connect to a computer outside
the firewall.

CHANGES SINCE LAST RELEASE
==

None. This is initial release.

INSTALL OR UPGRADE NOTES


None.

CYGWIN INSTALLATION INFORMATION
===

To install this package, click on the "Install Cygwin now" link on the
 web page. This downloads setup.exe to your
system. Then, run setup and answer all of the questions. You'll find
the package listed in the "All" category. After installation, read the
documentation at directories:

/usr/share/doc//*
/usr/share/doc/Cygwin/.README

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

CYGWIN-ANNOUNCE UNSUBSCRIBE INFO


This message has been sent to cygwin-announce list.

If you want to unsubscribe from the 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]

More information on unsubscribing can be found:

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

Please read *all* of the information on unsubscribing that is available
starting at the above 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/



[ANNOUNCEMENT] New Package: jikes-1.22 -- Fast Java compiler adhering to language and VM specifications

2006-02-06 Thread Jari Aalto

PACKAGE DESCRIPTION
===

Home page: http://www.sourceforge.net/project/jikes
License  : IBM Public License (OSI approved)

IBM's Java compiler (now Open Source) that translates Java
source files as defined in The Java Language Specification
(Addison-Wesley, 1996) into the bytecoded instruction set and binary
format defined in The Java Virtual Machine Specification
(Addison-Wesley, 1996). Unlike other compilers, Jikes accepts the Java
language only as specified: not as a subset, variant, or superset.

CHANGES SINCE LAST RELEASE
==

None. This is initial release.

INSTALL OR UPGRADE NOTES


None.

CYGWIN INSTALLATION INFORMATION
===

To install this package, click on the "Install Cygwin now" link on the
 web page. This downloads setup.exe to your
system. Then, run setup and answer all of the questions. You'll find
the package listed in the "All" category. After installation, read the
documentation at directories:

/usr/share/doc//*
/usr/share/doc/Cygwin/.README

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

CYGWIN-ANNOUNCE UNSUBSCRIBE INFO


This message has been sent to cygwin-announce list.

If you want to unsubscribe from the 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]

More information on unsubscribing can be found:

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

Please read *all* of the information on unsubscribing that is available
starting at the above 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/



problems with exit codes on 64-bit Windows XP Pro x64

2006-02-06 Thread Kevin Layer
/* demonstrate a bug in capturing the exit code from shell */

#include 
#include 
#include 
#include 
#include 
#include 

#define _POSIX_
#include 
#include 
#include 

main (int argc, char *argv[])
{
exit(1);
}
/* demonstrate a bug in capturing the exit code from shell */

#include 
#include 
#include 
#include 
#include 
#include 

#define _POSIX_
#include 
#include 
#include 

main (int argc, char *argv[])
{
int docommand(char *), res;

if (argc > 1) {
	res = docommand(argv[1]);
	printf("result = %d\n", res);
} else {
	 printf("no command!\n");
}
}

char *make_command_line(char *cmdline)
{
char buf[1024];
sprintf(buf, "sh -c \"%s\"", cmdline);
return strdup(buf);
}

int
docommand(char *cmdline)
{
STARTUPINFO startup_info;
PROCESS_INFORMATION process_info;
SECURITY_ATTRIBUTES security;
char *newcmdline;
DWORD status;

HANDLE output_write = 0;
HANDLE erroroutput_write = 0;
HANDLE input_read = 0;

HANDLE current_process;


memset(&startup_info, 0, sizeof(startup_info));
startup_info.cb = sizeof(startup_info);

security.nLength = sizeof(security);
security.lpSecurityDescriptor = 0; 
security.bInheritHandle = FALSE;

startup_info.dwFlags = STARTF_USESTDHANDLES;

current_process = GetCurrentProcess();

newcmdline=make_command_line(cmdline);

if (!DuplicateHandle(current_process,
			 GetStdHandle(STD_INPUT_HANDLE),
			 current_process,
			 &input_read,
			 0,
			 TRUE, /* inherit this one */
			 DUPLICATE_SAME_ACCESS)) input_read = 0;
startup_info.hStdInput   = input_read;
if (!DuplicateHandle(current_process,
			 GetStdHandle(STD_OUTPUT_HANDLE),
			 current_process,
			 &output_write,
			 0,
			 TRUE, /* inherit this one */
			 DUPLICATE_SAME_ACCESS)) output_write = 0;
startup_info.hStdOutput  = output_write;
if (!DuplicateHandle(current_process,
			 GetStdHandle(STD_ERROR_HANDLE),
			 current_process,
			 &erroroutput_write,
			 0,
			 TRUE, /* inherit this one */
			 DUPLICATE_SAME_ACCESS)) erroroutput_write = 0;
startup_info.hStdError  = erroroutput_write;


if ((startup_info.hStdInput  == 0) &&
	(startup_info.hStdOutput == 0) &&
	(startup_info.hStdError  == 0)) {

	/* clear this bit */
	startup_info.dwFlags &= ~STARTF_USESTDHANDLES;
}

if (!CreateProcess(0, newcmdline, 0, 0, 
		   1, /* inherit handles */
		   0x214,
		   0, 0, &startup_info, &process_info)) {
  printf("CreateProces(%s) failed. error code %ld\n", 
	 cmdline, GetLastError());
  free(newcmdline);
  return 1;
}

free(newcmdline);

ResumeThread(process_info.hThread);
CloseHandle(process_info.hThread);

/* Wait for the process to exit */
WaitForSingleObject(process_info.hProcess, INFINITE);
if(!GetExitCodeProcess(process_info.hProcess, &status)) {
  printf("GetExitCodeProcess failed! error %ld\n", GetLastError());
  exit(1);
}

CloseHandle(process_info.hProcess);

return status;

}

Cygwin Configuration Diagnostics
Current System Time: Mon Feb 06 14:09:14 2006

Windows XP Professional Ver 5.1 Build 2600 

Running under WOW64 on AMD64

Running in Terminal Service session

Path:	.
	c:\bin
	c:\cygwin\bin
	c:\cygwin\usr\X11R6\bin
	C:\WINDOWS\system32
	C:\WINDOWS
	C:\WINDOWS\System32\Wbem
	C:\Program Files\Microsoft Platform SDK\Bin\.
	C:\Program Files\Microsoft Platform SDK\Bin\WinNT\.
	c:\Program Files\Debugging Tools for Windows 64-bit
	c:\Program Files\Microsoft Platform SDK\bin\win64\x86\AMD64

Output from C:\cygwin\bin\id.exe (nontsec)
UID: 11003(layer)GID: 10513(Domain Users)
544(Administrators)  545(Users)   10512(Domain Admins)
10513(Domain Users)

Output from C:\cygwin\bin\id.exe (ntsec)
UID: 11003(layer)GID: 10513(Domain Users)
544(Administrators)  545(Users)   10512(Domain Admins)
10513(Domain Users)

SysDir: C:\WINDOWS\system32
WinDir: C:\WINDOWS

PWD = '/c/acl80/src/cl/src'
CYGWIN = 'nontsec'
HOME = '/c'

Use '-r' to scan registry

c:  hd  NTFS238464Mb   4% CP CS UN PA FC 
d:  cd N/AN/A
e:  cd N/AN/A
f:  fd N/AN/A
g:  fd N/AN/A
h:  fd N/AN/A
i:  fd N/AN/A
y:  net NTFS 28040Mb  76% CP CSPAlayer
z:  net NTFS  8350Mb  87% CP CSPApc

z: /z system  textmode
y: /y system  textmode
C:\cygwin/lib  /usr/lib   system  textmode
C:\cygwin/bin  /usr/bin   system  textmode
c: /c system  textmode
C:\cygwin  /  system  textmode
.  /cygdrive  system  textmode,cygdrive

Found: c:\cygwin\bin\awk.exe
Found: c:\cygwin\bin\bash.exe
Found: c:\cygwin\bin\cat.exe
Found: c:\cygwin\bin\cp.exe
Not Found: cpp (good!)
Not Found: crontab
Found: c:\cygwin\bin\

Re: strange cygstart bug with current Cygwin versions

2006-02-06 Thread Michael Schaap
On 6-Feb-2006 22:29, David Picton wrote:
> On 2/3/06, Igor Peshansky <[EMAIL PROTECTED]> wrote:
>   
>> Sounds like an instance of
>> ...  Does it work if
>> you "cygstart cmd" and then start word from that cmd shell?  If you get
>> the same symptoms, please run "set" in that cmd window and compare the
>> output with the same in a cmd started via "Start->Run"...
>> 
>
> I get the same symptoms, and now I can see what the problem is.  The 
> CMD window shows that TEMP and TMP have retained Cygwin-style
> pathnames:
>
> TEMP=/cygdrive/c/DOCUME~1/dave/LOCALS~1/Temp
> TMP=/cygdrive/c/DOCUME~1/dave/LOCALS~1/Temp
>
> Word works OK if I set TMP to a proper Windows pathname e.g. D:\cygwin\tmp
>
>   
Hmm, indeed it does ...

Under Cygwin 1.5.18, a process started using the Win32 ShellExecute
function (which cygstart uses) inherits the entire Cygwin environment,
with the appropriate variables, including TEMP and TMP, converted from
POSIX to Windows standard.

Under Cygwin 1.5.19, however, it only appears to inherit the following
variables: COMSPEC, PATH, PATHEXT, PROMPT, SYSTEMDRIVE and SYSTEMROOT
and WINDIR.

Some code was added to cygstart last May that copies all enviroment
variables from the Cygwin enviroment to the Windows enviroment, if they
don't exist there yet.  This was apparently needed in some obscure
circumstances at the time (regarding "mount -X", I think), but it looks
like it is now always necessary.
(See  and
, among others.)

This code has no special handling for path conversion.  We knew that
PATH was already in the Windows environment, so we didn't have to care
about that one.  But we didn't think of other variables...

I had a look at the Cygwin source code, and, in environment.cc, it seems
to do path conversion for the following variables: PATH, HOME,
LD_LIBRARY_PATH, TMPDIR, TMP and TEMP.  So, we should probably do so in
cygstart as well...
However, I'd rather not have to hardcode all of this in the cygstart
source code, since it is bound to get out of sync at some point.  So,
I'm hoping there is some way to use some Cygwin functionality directly.

Is there anyone with a better grasp of Cygwin's environment handling
code that could help with this, perhaps?
What we basically need to do, is copy the Cygwin environment to the
Windows environment, taking care of path conversion for all the
appropriate variables.

The current code we use is as follows:

/* Copy cygwin environment variables to the Windows environment if
they're not
 * already there. */
static void setup_win_environ(void)
{
char **envp = environ;
char *var, *val;
char curval[2];

while (envp && *envp) {
var = strdup(*envp++);
val = strchr(var, '=');
*val++ = '\0';
   
if (GetEnvironmentVariable(var, curval, 2) == 0
&& GetLastError() == ERROR_ENVVAR_NOT_FOUND) {
SetEnvironmentVariable(var, val);
}

free(var);
}
}

Thanks in advance,

 - Michael

--
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: problems with exit codes on 64-bit Windows XP Pro x64

2006-02-06 Thread Kevin Layer
[Interestingly, the text of my message was stripped out... here it is]

I'm running the latest cygwin (1.5.19, see cygcheck below).

My application is a native Windows app (64 and 32-bit).  It includes
no cygwin libraries and is not compiled with cygwin's gcc.  When I
execute cygwin programs from my app, however, the return value
obtained from cygwin programs is always 0.

More precisely, I spawn a particular cygwin program, say `make' or
`sh', with CreateProcess().  When the program exits
GetExitCodeProcess() always sets the exit status to 0, no matter what
the real exit status was.

Attached are 2 programs, exit1.c and bug.c.  Compile with:

cl bug.c bufferoverflowu.lib
cl exit1.c bufferoverflowu.lib

[cl is MS C/C++ version 14, found in the SDK.]

Then, running on 64-bit windows:

  ./bug exit1
  result = 0

Doing the experimentn on 32-bit Windows gets the output

  result = 1

Below are the files.

Is this a known issue?  Any chance of a fix?

-- 
Kevin Layer [EMAIL PROTECTED]http://www.franz.com/
Franz Inc., 555 12th St., Suite 1450, Oakland, CA  94607, USA
Phone: (510) 452-2000   FAX: (510) 452-0182


--
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: problems with exit codes on 64-bit Windows XP Pro x64

2006-02-06 Thread Samuel Thibault
Hi,

Kevin Layer, le Mon 06 Feb 2006 14:37:00 -0800, a écrit :
Content-Description: bug.c
> /* demonstrate a bug in capturing the exit code from shell */
> main (int argc, char *argv[])
> {
> int docommand(char *), res;
> 
> if (argc > 1) {
>   res = docommand(argv[1]);
>   printf("result = %d\n", res);
> } else {
>printf("no command!\n");
> }
> }

There is no "return res;" here, is that on purpose ?

Regards,
Samuel

--
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: problems with exit codes on 64-bit Windows XP Pro x64

2006-02-06 Thread Kevin Layer
Samuel Thibault <[EMAIL PROTECTED]> wrote:

>> Hi,
>> 
>> Kevin Layer, le Mon 06 Feb 2006 14:37:00 -0800, a écrit :
>> Content-Description: bug.c
>> > /* demonstrate a bug in capturing the exit code from shell */
>> > main (int argc, char *argv[])
>> > {
>> > int docommand(char *), res;
>> > 
>> > if (argc > 1) {
>> >res = docommand(argv[1]);
>> >printf("result = %d\n", res);
>> > } else {
>> > printf("no command!\n");
>> > }
>> > }
>> 
>> There is no "return res;" here, is that on purpose ?

No, but it's not relevant to the problem.  (The main text of my message
wasn't sent until later, since something stripped it out.)

Kevin

--
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: strange cygstart bug with current Cygwin versions

2006-02-06 Thread Yitzchak Scott-Thoennes
On Mon, Feb 06, 2006 at 11:40:22PM +0100, Michael Schaap wrote:
> What we basically need to do, is copy the Cygwin environment to the
> Windows environment, taking care of path conversion for all the
> appropriate variables.

Maybe start with:

http://www.cygwin.com/ml/cygwin-patches/2005-q4/msg9.html

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



Cygwin hang related to "FIFO" (?) during "File::BOM" test in CPAN

2006-02-06 Thread Linda Walsh

I've been trying to install the perl CPAN module "File::BOM" for
several days, now, and  keep running into a hang under Cygwin
(I can install it successfully under linux).

I've tried updating cygwin software as well as, seemingly,
unrelated CPAN modules, but it's still reliably hanging during
the "test" phase.  To duplicate:
# cpan
# test File::BOM
---
It appears to fail on test 01, but that's due to buffered output.
modifying test "01" to use unbuffered output it runs "fine" up
through test "85".  To run the tests "manually":
# cpan
# make File::BOM
# look File::BOM
perl -Ilib t/00..setup.t  #creates test files in t/data
perl -Ilib t/01..bom.t# this is the step that generates the hang
---
To enable more output, I unbuffered the test's output by adding:
   select STDOUT; $|=1;
as the 2nd line in "t/01..bom.t".

With buffering I only see "1.."; w/o buffering I see 85 out of 115 tests
complete before it hangs.

Pressing control-c & control-break in the window  _appear_ to
do nothing, but eventually yield an error message:

14 [unknown (0x198)] perl 1920 sig_send: wait for sig_complete 
event failed

, signal 2, rc 258, Win32 error 0

In a useless attempt to narrow the problem down, I tried installing
the old "cygwin-1.5.18-1" version via cygwin_setup.  Same problem. :-(.
Current cygwin= "1.5.19-4".

Let me know if you need more information, but it doesn't seem to
depend on the cygwin library version.  cygcheck of perl.exe:
# cygcheck -v perl.exe|egrep -v done\|recursive
Found: C:\bin\perl.exe
C:/bin/perl.exe - os=4.0 img=1.0 sys=4.0
 "perl.exe" v0.0 ts=2005/12/29 17:48
 C:\bin\cygwin1.dll - os=4.0 img=1.0 sys=4.0
   "cygwin1.dll" v0.0 ts=2006/1/20 10:28
   C:\WINDOWS\System32\ADVAPI32.DLL - os=5.1 img=5.1 sys=4.0
 "ADVAPI32.dll" v0.0 ts=2002/8/29 2:09
 C:\WINDOWS\System32\ntdll.dll - os=5.1 img=5.1 sys=4.0
   "ntdll.dll" v0.0 ts=2003/4/30 17:43
 C:\WINDOWS\System32\KERNEL32.dll - os=5.1 img=5.1 sys=4.0
   "KERNEL32.dll" v0.0 ts=2004/6/17 10:11
 C:\WINDOWS\System32\RPCRT4.dll - os=5.1 img=5.1 sys=4.10
   "RPCRT4.dll" v0.0 ts=2004/3/5 17:58
 C:\bin\cygperl5_8.dll - os=4.0 img=1.0 sys=4.0
   "cygperl5_8.dll" v0.0 ts=2005/12/29 17:48
   C:\bin\cygcrypt-0.dll - os=4.0 img=1.0 sys=4.0
 "cygcrypt-0.dll" v0.0 ts=2003/10/19 0:57









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