RE: 1.7.13/1.7.14: Issue with command prompt not returning when forking process

2012-05-05 Thread Rob Burgers
Hi,

The issue I'm raising in here may be related to this post: 
http://cygwin.com/ml/cygwin/2012-05/msg00081.html
It is the first time I read that something may have changed in this area. This 
is to me unexpected and it caused us quite some debugging to find out as the 
relation between the updated kernel release due to installation of new packages 
and the appearance of the issue were not so obvious.

The example I'm providing in this post is a much simplified version of the 
actual application. In our application the Launcher (L) process is called from 
a script and the exit code of the process is needed to determine the next step. 
Since L never returns until the forked process (S) terminates the exit code 
will not be available. So running L as a background process doesn't help here.

I also noticed the difference in behaviour between Cygwin and Linux and since 
it is Cygwin's intention to provide a Linux look and feel on a Windows 
environment, I wondering if it is meant to be like this. More over: In the 
1.7.10 release the behaviour was still identical to Linux.

If the statement in the other post remains, I'm wondering whether it would be 
possible to make the old-behaviour available e.g. by means of a registry key?

To get back to Earnie's reply, using 'run' makes no difference at all (i.e. it 
suffers from the exact same issue):

Kernel release 1.7.9 (no delay):
$ date; run java Launcher; date
Fri May  4 16:37:14 WEDT 2012
Fri May  4 16:37:14 WEDT 2012

Kernel release 1.7.13 (2 minute delay):
$ date; run java Launcher; date
Fri, May 04, 2012  3:27:35 PM
Fri, May 04, 2012  3:29:35 PM

Ubuntu 12.04 (no delay):
$ date; java Launcher; date
Sat May  5 09:19:51 CEST 2012
Launching Server
Launched Server
Sat May  5 09:19:51 CEST 2012

Best regards,
Rob


Re: 1.7.14-2: bash not accepting "~" (tilde) from keyboard in Console (WIN7)

2012-05-05 Thread Csaba Raduly
Hi Chris,

On Fri, May 4, 2012 at 11:43 PM, Chris Brouwer  wrote:
> Hello,
>
> I have just installed Cygwin 1.17.14-2 using the setup.exe.
>
> I use Console (portable; from Portableapp.Com) as my entry to bash. I
> created an extra tab definition for Console, which starts cygwin.bat. Works
> as expected, so far.
> The odd thing is, if I want to use, eg cd ~, the tilde is not shown, but the
> backtick "`" is.

You mean the backtick appears _instead_of_ the tilde? That would be a
problem with the keyboard layout. Do you have a British layout?
(http://www.goodtyping.com/teclatUK.htm)

Csaba
-- 
GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++
The Tao of math: The numbers you can count are not the real numbers.
Life is complex, with real and imaginary parts.
"Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds
"People disagree with me. I just ignore them." -- Linus Torvalds

--
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: 1.7.13/1.7.14: Issue with command prompt not returning when forking process

2012-05-05 Thread Corinna Vinschen
On May  5 10:05, Rob Burgers wrote:
> Hi,
> 
> The issue I'm raising in here may be related to this post: 
> http://cygwin.com/ml/cygwin/2012-05/msg00081.html
> It is the first time I read that something may have changed in this area. 
> This is to me unexpected and it caused us quite some debugging to find out as 
> the relation between the updated kernel release due to installation of new 
> packages and the appearance of the issue were not so obvious.
> 
> The example I'm providing in this post is a much simplified version of the 
> actual application. In our application the Launcher (L) process is called 
> from a script and the exit code of the process is needed to determine the 
> next step. Since L never returns until the forked process (S) terminates the 
> exit code will not be available. So running L as a background process doesn't 
> help here.
> 
> I also noticed the difference in behaviour between Cygwin and Linux and since 
> it is Cygwin's intention to provide a Linux look and feel on a Windows 
> environment, I wondering if it is meant to be like this. More over: In the 
> 1.7.10 release the behaviour was still identical to Linux.
> 
> If the statement in the other post remains, I'm wondering whether it would be 
> possible to make the old-behaviour available e.g. by means of a registry key?

If Cygwin behaves different than Linux then that's not really intended.
However, this only goes as far as Cygwin processes are affected.  We
can't (and don't) make any such guarantee for native, non-Cygwin
processes.

Are the affected processes Cygwin processes?  If so, can you please
provide a very simple testcase in plain C?


Corinna

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

--
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: OpenSSH using root for the .ssh directory?

2012-05-05 Thread Corinna Vinschen
On May  5 09:23, Fedin Pavel wrote:
> On 05.05.2012 7:06, Chris Sutcliffe wrote:
> >I'm at a loss as to why it's looking in the root directory.
> 
>  Look at your /etc/passwd. Here, on my machine,home directory is
> empty for my username. Perhaps mkpasswd's bug. You can fix it by
> manually setting the right path in /etc/passwd.

Indeed, that's a bug in mkpasswd I introduced in December.  I don't know
what I was thinking when I made the change, but it results in the
following misbehaviour:

If you run mkpasswd with the -c option to generate an entry for the
current user, and if $HOME is set at the time, then mkpasswd misses to
print the value of $HOME, and the generated passwd entry keeps empty.

I fixed that in CVS for now, but I'm wondering if that doesn't qualify
for a new Cygwin release...


Corinna

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

--
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: OpenSSH using root for the .ssh directory?

2012-05-05 Thread Thomas Wolff

Am 05.05.2012 07:23, schrieb Fedin Pavel:

On 05.05.2012 7:06, Chris Sutcliffe wrote:

I'm at a loss as to why it's looking in the root directory.


 Look at your /etc/passwd. Here, on my machine,home directory is empty 
for my username. Perhaps mkpasswd's bug. You can fix it by manually 
setting the right path in /etc/passwd.


It's a bug in openssh (I think) that it does not use $HOME but retrieves 
the used home directory via getpwuid() which looks into /etc/passwd.
I reported this upstream a while ago but since on Linux systems fewer 
people have a $HOME setting different from /etc/passwd they don't seem 
to care. Also I got the hint that it uses getpwuid in some situations 
and $HOME in others which can be seen in the code but yet remains obscure.

Maybe a cygwin-specific patch could fix it.
Thomas

--
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: OpenSSH using root for the .ssh directory?

2012-05-05 Thread Chris Sutcliffe
On 5 May 2012 01:23, Fedin Pavel wrote:
>  Look at your /etc/passwd. Here, on my machine,home directory is empty for
> my username. Perhaps mkpasswd's bug. You can fix it by manually setting the
> right path in /etc/passwd.

That fixed it, thanks!

On 5 May 2012 04:55, Corinna Vinschen wrote:
> Indeed, that's a bug in mkpasswd I introduced in December.  I don't know
> what I was thinking when I made the change, but it results in the
> following misbehaviour:
>
> I fixed that in CVS for now, but I'm wondering if that doesn't qualify
> for a new Cygwin release...

As per Thomas' response, anything that depends on getpwuid() would be
affected and for only new installs (which would explain why I hadn't
seen this before).  So as to not confuse new users, it may be worth
the effort to produce a new release.

On 5 May 2012 06:15, Thomas Wolff wrote:
> It's a bug in openssh (I think) that it does not use $HOME but retrieves the
> used home directory via getpwuid() which looks into /etc/passwd.
> I reported this upstream a while ago but since on Linux systems fewer people
> have a $HOME setting different from /etc/passwd they don't seem to care.
> Also I got the hint that it uses getpwuid in some situations and $HOME in
> others which can be seen in the code but yet remains obscure.

Agreed, it seems odd that ssh is ignoring $HOME.

Thank you,

Chris

-- 
Chris Sutcliffe
http://emergedesktop.org
http://www.google.com/profiles/ir0nh34d

--
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: 'cmd /C start cmd' no longer non-blocking (base-cygwin 3.1-1), but used to work (in base-cygwin 3.0-1)

2012-05-05 Thread Andrey Repin
Greetings, Petrisor Eddy-Marian-B36037!

> I am using at work cygwin on various machines (XP and Windows 7) and made
> several scripts that use gnu utilities from cygwin. One of those is a script
> that starts in paralel instances of cmd various parts of a build system
> through a sh script that invokes 'cmd /C start ...'

Why? Aren't your default ComSpec isn't CMD already?

> to start those parts of the build system in a non-blocking fashion.

If it's (b?a|tc)?sh script - use backgrounding (The &)
If it's a CMD script - use backgrounding (START "" /B "command" args)
Problem solved.

> Recently, on one of the machines which had its cygwin installation upgraded,
> I have observed that the cmd instances do not start in a non-blocking
> fashion anymore, but instead wait for the process to finish.


> To be more precise, following the following steps should lead to two
> interactive windows, one with the sh prompt and one with the cmd prompt,
> both waiting for user input:
> 1 - start a cygwin (or sh) command window
> 2 - type "cmd /C start cmd"

> Expected result:
> Two interactive and usable windows, one with the sh prompt, one with the cmd
> prompt, both waiting for user input.

For new interactive windows from withing Cygwin shell - use run program. And
again, backgrounding, if necessary.

> Actual result:
> Two windows, one with sh and one with cmd, Cygwin/sh window blocked and 
> waiting for the cmd window to finish.


--
WBR,
Andrey Repin (anrdae...@freemail.ru) 05.05.2012, <15:27>

Sorry for my terrible english...


--
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: Question about kill

2012-05-05 Thread eric_justin_al...@cfl.rr.com

Andrey Repin wrote:

Greetings, eric_justin_al...@cfl.rr.com!


Well kill program_name didn't work and kill -9 is pretty much what I am
looking for.
Does it matter if you are gonna overwrite the program if you use kill -9?

You have to answer it for yourself.
Do your program write any critical state chages to a disk, when exits or at
any point in process? Is it writing logs?

And, please, don't top-post.


--
WBR,
Andrey Repin (anrdae...@freemail.ru) 05.05.2012,<15:24>

Sorry for my terrible english...



Why can't I top post?

--
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: Question about kill

2012-05-05 Thread marco atzeri

On 5/6/2012 12:08 AM, eric_justin_al...@cfl.rr.com wrote:

Andrey Repin wrote:

Greetings, eric_justin_al...@cfl.rr.com!


Well kill program_name didn't work and kill -9 is pretty much what I am
looking for.
Does it matter if you are gonna overwrite the program if you use kill
-9?

You have to answer it for yourself.
Do your program write any critical state chages to a disk, when exits
or at
any point in process? Is it writing logs?

And, please, don't top-post.


--
WBR,
Andrey Repin (anrdae...@freemail.ru) 05.05.2012,<15:24>

Sorry for my terrible english...



Why can't I top post?



http://www.caliburn.nl/topposting.html

--
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: Short gdb question.

2012-05-05 Thread eric_justin_al...@cfl.rr.com

Reid Thompson wrote:

On Fri, 2012-05-04 at 00:45 -0700, eric_justin_al...@cfl.rr.com wrote:

Alright if I download and compile it can I just mv gdb.exe into /bin
and
overwrite gdb.exe?


use
./configure --prefix=/
make
make install

and it should end up in the right place



Yea all I did was get install errors after a very long compilation. 
here's a copy of the errors:

$ make install
make[1]: Entering directory `/usr/src/gdb-7.4.1'
/bin/sh ./mkinstalldirs /  /
make[2]: Entering directory `/usr/src/gdb-7.4.1/bfd'
make  install-recursive
make[3]: Entering directory `/usr/src/gdb-7.4.1/bfd'
Making install in doc
make[4]: Entering directory `/usr/src/gdb-7.4.1/bfd/doc'
test -z "//share/info" || /usr/bin/mkdir -p "//share/info"
/usr/bin/mkdir: cannot create directory `//share': Read-only file system
Makefile:661: recipe for target `install-info-am' failed
make[4]: *** [install-info-am] Error 1
make[4]: Leaving directory `/usr/src/gdb-7.4.1/bfd/doc'
Making install in po
make[4]: Entering directory `/usr/src/gdb-7.4.1/bfd/po'
if test -r .././../mkinstalldirs; then \
  .././../mkinstalldirs //share; \
else \
  ../mkinstalldirs //share; \
fi
mkdir -p -- //share
mkdir: cannot create directory `//share': Read-only file system
Makefile:507: recipe for target `install-data-yes' failed
make[4]: *** [install-data-yes] Error 1
make[4]: Leaving directory `/usr/src/gdb-7.4.1/bfd/po'
make[4]: Entering directory `/usr/src/gdb-7.4.1/bfd'
make[5]: Entering directory `/usr/src/gdb-7.4.1/bfd'
make[5]: Nothing to be done for `install-exec-am'.
test -z "//include" || /usr/bin/mkdir -p "//include"
/usr/bin/mkdir: cannot create directory `//include': Read-only file system
Makefile:1564: recipe for target `install-bfdincludeHEADERS' failed
make[5]: *** [install-bfdincludeHEADERS] Error 1
make[5]: Leaving directory `/usr/src/gdb-7.4.1/bfd'
Makefile:1734: recipe for target `install-am' failed
make[4]: *** [install-am] Error 2
make[4]: Leaving directory `/usr/src/gdb-7.4.1/bfd'
Makefile:1591: recipe for target `install-recursive' failed
make[3]: *** [install-recursive] Error 1
make[3]: Leaving directory `/usr/src/gdb-7.4.1/bfd'
Makefile:1728: recipe for target `install' failed
make[2]: *** [install] Error 2
make[2]: Leaving directory `/usr/src/gdb-7.4.1/bfd'
Makefile:2579: recipe for target `install-bfd' failed
make[1]: *** [install-bfd] Error 2
make[1]: Leaving directory `/usr/src/gdb-7.4.1'
Makefile:2082: recipe for target `install' failed
make: *** [install] Error 2




--
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: OpenSSH using root for the .ssh directory?

2012-05-05 Thread Karl M

> Date: Sat, 5 May 2012 10:55:56 +0200
> From: corinna
> To: cygwin
> Subject: Re: OpenSSH using root for the .ssh directory?
>  
> If you run mkpasswd with the -c option to generate an entry for the
> current user, and if $HOME is set at the time, then mkpasswd misses to
> print the value of $HOME, and the generated passwd entry keeps empty.
> 
> I fixed that in CVS for now, but I'm wondering if that doesn't qualify
> for a new Cygwin release...
> 
Given the other recent fixes by Chris (and others?) I would like to see an 
update.

 

Thanks,

 

...Karl   

--
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: find.exe vs. cmd.exe dir command vs. filesystem object in vbs script

2012-05-05 Thread Buchbinder, Barry (NIH/NIAID) [E]
Cary Lewis sent the following at Friday, April 27, 2012 10:29 AM
>I have a system that makes use of a number of directories which contain
>hundreds of thousands of files.
>
>The sheer number of files in the directories makes it very difficult to
>do simple things using cygwin.
>
>For example the find command takes a very long time to start outputting
>filenames.
>
>However, in a cmd.exe window, the dir.exe command immediately starts
>outputting files.
>
>I would like to find out which api calls the CMD dir.exe command is
>using vs. the cygwin find.exe program.
>
>In the end I want to build an efficient delete files utility based on
>date, type, etc. I also need to compare files in the filesystem with
>references in a database
>
>I am starting to think that I should use the CMD dir.exe command and by
>parsing its output, take appropriate action.
>
>Performance is further hampered by the files residing on a SAN.

I use cmd's DIR to just get file & directory names, finding it much faster
than find.

$ "$(cygpath -u "${COMSPEC}")" /c dir /s /b /a: /o:n "$(cygpath -w 
"${CygwinPath}")" | \
tr -s '\r\n' '\n' | \
cygpath -u -f -

(There might be a speed advantages to working up a sed script instead of using
cygpath.  Based on *no data*, I've assumed that cmd's speed advantage over find
is due to not stating files.  If cygpath stats files, sed might be faster.)

While you might be able to get cmd /c DIR to give you dates, that will
probably require use of gawk or the like.

- Barry
  Disclaimer:  Statements made herein are not made on behalf of NIAID.


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



How do I build this program for Cygwin?

2012-05-05 Thread Marilo
I don't have a background in C..

I want to compile this program for Cygwin..

http://netcat.cvs.sourceforge.net/viewvc/netcat/?view=tar

I know cygwin has a netcat package installed, but I think this one on 
sourceforge might be more up to date.

I've heard for example that the one on sourceforge supports socks, and i'm not 
sure that the nc built into cygwin does.

I want to use the switch
-X proto



I have the subdirectory here

Steve@comp ~/netcat/netcat
$ ls -l
total 153
-rwxr-xr-x  1 Steve None 45213 Jan 15  2004 ABOUT-NLS
-rwxr-xr-x  1 Steve None   473 Dec 10  2003 AUTHORS
-rwxr-xr-x  1 Steve None 12620 Oct 24  2004 ChangeLog
-rwxr-xr-x  1 Steve None 14987 Jan 15  2004 config.rpath
-rwxr-xr-x  1 Steve None  5816 Jan 15  2004 configure.ac
-rwxr-xr-x  1 Steve None 17992 May  4  2002 COPYING
drwxr-xr-x+ 1 Steve None 0 May  5 23:18 doc
-rwxr-xr-x  1 Steve None  9240 Oct  2  2002 INSTALL
drwxr-xr-x+ 1 Steve None 0 May  5 23:18 lib
drwxr-xr-x+ 1 Steve None 0 May  5 23:18 m4
-rwxr-xr-x  1 Steve None   930 Jan 15  2004 Makefile.am
-rwxr-xr-x  1 Steve None   902 Jun  8  2002 Makefile.cvs
-rwxr-xr-x  1 Steve None  2929 Jan 15  2004 mkinstalldirs
-rwxr-xr-x  1 Steve None  6143 Jan 11  2004 NEWS
drwxr-xr-x+ 1 Steve None 0 May  5 23:18 po
-rwxr-xr-x  1 Steve None  1041 Jan  3  2004 README
-rwxr-xr-x  1 Steve None  2464 Oct 24  2004 README.CVS
drwxr-xr-x+ 1 Steve None 0 May  5 23:18 src
-rwxr-xr-x  1 Steve None  2019 Oct 24  2004 TODO

Steve@comp ~/netcat/netcat

But I see no "configure" file, and when I try to run INSTALL I get a syntax 
error.

So i'm wondering if maybe i'm going the wrong way about it.

$ ./INSTALL
./INSTALL: line 1: syntax error near unexpected token `C'
./INSTALL: line 1: `Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free 
Software'

Steve@comp ~/netcat/netcat
$






--
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: 'cmd /C start cmd' no longer non-blocking (base-cygwin 3.1-1), but used to work (in base-cygwin 3.0-1)

2012-05-05 Thread Buchbinder, Barry (NIH/NIAID) [E]
Andrey Repin sent the following at Saturday, May 05, 2012 7:31 AM
> On 5/4/2012 3:43 PM, Petrisor Eddy-Marian-B36037 wrote:
>> I am using at work cygwin on various machines (XP and Windows 7) and made
>> several scripts that use gnu utilities from cygwin. One of those is a script
>> that starts in paralel instances of cmd various parts of a build system
>> through a sh script that invokes 'cmd /C start ...'
>
>Why? Aren't your default ComSpec isn't CMD already?
>> to start those parts of the build system in a non-blocking fashion.
>
>If it's (b?a|tc)?sh script - use backgrounding (The &) If it's a CMD
>script - use backgrounding (START "" /B "command" args) Problem solved.
>> Recently, on one of the machines which had its cygwin installation upgraded,
>> I have observed that the cmd instances do not start in a non-blocking
>> fashion anymore, but instead wait for the process to finish.
>
>> To be more precise, following the following steps should lead to two
>> interactive windows, one with the sh prompt and one with the cmd prompt,
>> both waiting for user input:
>> 1 - start a cygwin (or sh) command window
>> 2 - type "cmd /C start cmd"
>
>> Expected result:
>> Two interactive and usable windows, one with the sh prompt, one with the cmd
>> prompt, both waiting for user input.
>
>For new interactive windows from withing Cygwin shell - use run program.
>And again, backgrounding, if necessary.
>> Actual result:
>> Two windows, one with sh and one with cmd, Cygwin/sh window blocked and
>>waiting for the cmd window to finish.

Question #1:

Why not use cygstart?

The only reason I ever use cmd /c start is to use the /wait option of start,
which is exactly not what you want.  (Indeed, I wouldn't mind it if a --wait
option was added to cygstart.  Hint.  Hint.)

Question #1.1:

Are you using the /wait option of cmd /c start?

Question #2:

Is there a reason that cygstart wasn't suggested earlier?

(That's not intended as a criticism.  I just want to know why in case there
was one.)

Thanks,

- Barry
  Disclaimer:  Statements made herein are not made on behalf of NIAID.


--
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: How do I build this program for Cygwin?

2012-05-05 Thread René Berber

On 5/5/2012 5:40 PM, Marilo wrote:

[snip]

But I see no "configure" file, and when I try to run INSTALL I get a syntax 
error.

So i'm wondering if maybe i'm going the wrong way about it.


You read the files README, and INSTALL, follow the instructions there.
--
René Berber


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



Setup cannot execute install scripts

2012-05-05 Thread Mikulas Patocka
Hi

I have a problem with cygwin setup.exe. Every time I run setup and the 
setup upgrades something, the setup is trying to run scripts at the end. 
These scripts fail (it happens after almost every upgrade of some 
package). The file /var/log/setup.log.full contains these error messages:

2012/05/03 03:48:53 running: cmd.exe /c 
"C:\Cygwin\etc\postinstall\autorebase.bat"
dash: 0: Can't open /bin/rebaseall
2012/05/03 03:48:53 abnormal exit: exit code=127
2012/05/03 03:48:53 running: C:\Cygwin\bin\bash.exe --norc --noprofile 
"/etc/postinstall/tcsh.sh"
bash.exe: warning: could not find /tmp, please create!
/usr/bin/bash: /etc/postinstall/tcsh.sh: No such file or directory
2012/05/03 03:48:53 abnormal exit: exit code=127
2012/05/03 03:48:53 running: C:\Cygwin\bin\bash.exe --norc --noprofile 
"/etc/postinstall/update-info-dir.sh"
bash.exe: warning: could not find /tmp, please create!
/usr/bin/bash: /etc/postinstall/update-info-dir.sh: No such file or 
directory
2012/05/03 03:48:54 abnormal exit: exit code=127

When I run setup again, the failures happen again.

I tried to add "bin\ls /" , "bin\ls /bin" and "bin\cygpath -w /" to 
autorebase.bat (and execute setup.exe again, so that it runs modified 
autorebase.bat) and the result is this:

bin/ls: cannot access /: No such file or directory
bin/ls: cannot access /bin: No such file or directory
C:\Cygwin
--- so cygpath is showing the correct path (cygwin is installed in 
C:\Cygwin), but ls and other utilities cannot access the root directory. 
When I run "bin\ls /cygdrive/c", it works --- prints the content of drive 
C.

When I start a window with just "cmd.exe" and execute autorebase.bat 
manually (cmd.exe /c "C:\Cygwin\etc\postinstall\autorebase.bat"), it 
works. When the same script is executed from setup.exe, it doesn't work 
--- "ls" cannot find "/" and dash cannot find "/bin/rebaseall".

When I run some cygwin session (just a bash shell) and run setup.exe 
simultaneously, script failures don't happen (but the setup can't upgrade 
cygwin1.dll and can't rebase it because it is open).

It looks like there is some bug in the setup (I have the latest setup 
2.774), when it is run as just the only cygwin session, it misconfigures 
filesystem, so that any programs spawned from setup.exe cannot access 
cygwin root.

Do you have some idea what is causing it, or what should I try to debug 
it?

Mikulas

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

2012-05-05 Thread Trey Greer
Jack  gmail.com> writes:

> 
> Ken Brown  cornell.edu> writes:
> 
> > 
> > Another (easier) thing you could do is try various snapshots between 
> > versions 1.7.10 and 1.7.11 of cygwin1.dll and pinpoint exactly when the 
> > problem first occurred.
> > 
> > Ken
> > 
> > 
> 
> Sadly, even the oldest cygwin1.dll snapshot (from 7/30/11) seems to have this 
> issue. There is a pointer on the emacs lists (for MacOS) that says I should 
> recompile with #define DONT_REOPEN_PTYS to avoid the "inappropriate ioctl for 
> device" problem. I was hoping to avoid recompiling emacs but I guess I'll 
> give 
> that a try. :)
> 
> Thanks for the ideas Ken.
> 
> Jack
> 
> 

Looking through the native (Windows) emacs 23.4.1 source, I don't
see how cygwin bash job control could ever have worked.  When I
do a ctrl-C ctrl-Z (emacs speak for suspend job) in the bash
shell in shell mode, emacs gives me the message 'No SIGTSTP
support'.  Poking through the source, this appears to be because
there is no SIGTSTP defined in windows, or at least not in the
configuration header emacs-23.4/src/s/ms-w32.h.

Emacs in windows does not have PTYS (HAVE_PTYS is not defined in
s/ms-w32.h) so shell-mode opens the cygwin bash shell with input
and output pipes instead of ptys.  A recent change to bash (as of
bash-4.1-alpha) causes bash to refuse job control if the
controlling terminal is not a tty.  See item jj. in the
bash-4.0-alpha entry in the changelog
bash-4.1.10-4/src/bash-4.1/CHANGES.

It looks to me like suspend (ctrl-C ctrl-Z) never worked for
cygwin bash within native windows gnu emacs, but I certainly
could be wrong.

I did try defeating the tty test mentioned above (in jobs.c in
the bash source).  Indeed, I was able to spawn jobs in the
background and kill them.  Just no signals from emacs.

-- Trey


--
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: "Inappropriate ioctl for device" problem using latest cygwin as a shell within native (non-cygwin) GnuEmac

2012-05-05 Thread Trey Greer
Ken Brown  cornell.edu> writes:

> 
> On 3/11/2012 3:42 PM, Ken Brown wrote:
> > On 3/11/2012 3:19 PM, Jack Profit wrote:
> >> After upgrading my cygwin environment this morning to version
> >> 1.7.11-1, I am no longer able to use cygwin bash as a shell within
> >> native GnuEmacs (Windows).
> >>
> >> When I invoke M-x shell, I now get the following output in the shell
> >> window:
> >>
> >> bash: cannot set terminal process group (-1): Inappropriate ioctl for
> >> device
> >> bash: no job control in this shell
> >> $
> >>
> >> The shell window is functional, but as the error message suggests, I
> >> have no Ctrl-C, Ctrl-Z or other job control functions.
> >>
> >> Here are my shell related .emacs settings:
> >> (setq explicit-shell-file-name "c:/cygwin/bin/bash.exe")
> >>
> >> I am using:
> >> GnuEmacs version 23.4.1 (latest)
> >> Bash version 4.1.10-4
> >> also Bash version 3.2.51-24 (removes error message, but job control
> >> still doesn't work)
> >>
> >> I also tried the cygwin1.dll from the 3/10 snapshot and saw no
> >> difference in behavior.
> >
> > I doubt if the Cygwin developers are going to be able to track this down
> > unless you can find a way to reproduce the problem without using native
> > emacs. Can you look into the emacs source for the native build and see
> > how it is creating the bash process? Maybe you can extract a simple test
> > case from it.
> 
> Another (easier) thing you could do is try various snapshots between 
> versions 1.7.10 and 1.7.11 of cygwin1.dll and pinpoint exactly when the 
> problem first occurred.
> 
> Ken
> 
> 

Looking through the native (Windows) emacs 23.4.1 source, I don't
see how cygwin bash job control could ever have worked.  When I
do a ctrl-C ctrl-Z (emacs speak for suspend job) in the bash
shell in shell mode, emacs gives me the message 'No SIGTSTP
support'.  Poking through the emacs source, this appears to be
because there is no SIGTSTP defined in windows, or at least not
in the configuration header emacs-23.4/src/s/ms-w32.h.

Emacs in windows does not have PTYS (HAVE_PTYS is not defined in
s/ms-w32.h) so shell-mode opens the cygwin bash shell with input
and output pipes instead of ptys.  A recent change to bash (as of
bash-4.1-alpha) causes bash to refuse job control if the
controlling terminal is not a tty.  See item jj. in the
bash-4.0-alpha entry in the changelog
bash-4.1.10-4/src/bash-4.1/CHANGES.

It looks to me like suspend (ctrl-C ctrl-Z) never worked for
cygwin bash within native windows gnu emacs, but I certainly
could be wrong.  

I did try defeating the tty test mentioned above (in jobs.c in
the bash source).  Indeed, I was able to spawn jobs in the
background and kill them.  Just no signals from emacs.

-- Trey



--
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: Short gdb question.

2012-05-05 Thread Earnie Boyd
On Sat, May 5, 2012 at 7:31 PM, eric_justin_allan wrote:
> Reid Thompson wrote:
>>
>> On Fri, 2012-05-04 at 00:45 -0700, eric_justin_al...@cfl.rr.com wrote:
>>>
>>> Alright if I download and compile it can I just mv gdb.exe into /bin
>>> and
>>> overwrite gdb.exe?
>>>
>> use
>> ./configure --prefix=/

It has already been stated that the configure prefix should be stated
as --prefix='' to avoid

> test -z "//share/info" || /usr/bin/mkdir -p "//share/info"
> /usr/bin/mkdir: cannot create directory `//share': Read-only file system

-- 
Earnie
-- https://sites.google.com/site/earnieboyd

--
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: Question about kill

2012-05-05 Thread Earnie Boyd
On Sat, May 5, 2012 at 4:18 PM, marco atzeri wrote:
> On 5/6/2012 12:08 AM, eric_justin_allan wrote:
>> Why can't I top post?
>>
>
> http://www.caliburn.nl/topposting.html

See also http://cygwin.com/acronyms/#TOFU

And also trimming the quote is always good.

-- 
Earnie
-- https://sites.google.com/site/earnieboyd

--
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: How do I build this program for Cygwin?

2012-05-05 Thread Marilo


--- On Sat, 5/5/12, René Berber wrote:

> From: René Berber 
> Subject: Re: How do I build this program for Cygwin?
> To: cygwin mailing list
> Date: Saturday, 5 May, 2012, 23:54
> On 5/5/2012 5:40 PM, Marilo wrote:
> 
> [snip]
> > But I see no "configure" file, and when I try to run
> INSTALL I get a syntax error.
> >
> > So i'm wondering if maybe i'm going the wrong way about
> it.
> 
> You read the files README, and INSTALL, follow the
> instructions there.
> -- 
> René Berber
> 

Thanks.. Still getting issues though.. 

$ autoconf-2.13
autoconf: configure.in: No such file or directory
--

Steve@cfw5 ~/netcat/netcat
$ autoconf-2.68
configure.ac:25: error: possibly undefined macro: AM_INIT_AUTOMAKE
  If this token and others are legitimate, please use m4_pattern_allow.
  See the Autoconf documentation.
configure.ac:29: error: possibly undefined macro: AM_CONFIG_HEADER
configure.ac:52: error: possibly undefined macro: AM_GNU_GETTEXT
configure.ac:53: error: possibly undefined macro: AM_INTL_SUBDIR
configure.ac:56: error: possibly undefined macro: AC_LBL_LIBRARY_NET
configure.ac:144: error: possibly undefined macro: AM_CONDITIONAL

I tried this at some point as mentioned on a webpage
$ autoreconf -f -i -Wall,no-obsolete

I saw somebody suggested on a webpage
$ autoreconf-2.68 -vi
but that said can't exec aclocal.. and said failed..

and running aclocal was suggested

I see when looking for autoconf, automake which mentions aclocal so  I install 
that.

I think at this stage..

autoreconf-2.68 runs without giving an error or any output at all.

Steve@cfw5 ~/netcat/netcat
$ ./configure
configure: error: cannot find install-sh, install.sh, or shtool in "." "./.." ".
/../.."

I see libtool suggested.. so  I download that..

I see install-sh is in cygwin\usr\share\automake-1.10 and others..
so I copy it to .
Then run ./configure

then ./configure runs

Then I do make
and get errors


$ make
make  all-recursive
make[1]: Entering directory `/home/Steve/netcat/netcat'
Making all in m4
make[2]: Entering directory `/home/Steve/netcat/netcat/m4'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/Steve/netcat/netcat/m4'
Making all in lib
make[2]: Entering directory `/home/Steve/netcat/netcat/lib'
Making all in contrib
make[3]: Entering directory `/home/Steve/netcat/netcat/lib/contrib'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/Steve/netcat/netcat/lib/contrib'
make[3]: Entering directory `/home/Steve/netcat/netcat/lib'
make[3]: Nothing to be done for `all-am'.
make[3]: Leaving directory `/home/Steve/netcat/netcat/lib'
make[2]: Leaving directory `/home/Steve/netcat/netcat/lib'
Making all in src
make[2]: Entering directory `/home/Steve/netcat/netcat/src'
gcc -DLOCALEDIR=\"\/usr/local/share/locale\" -DHAVE_CONFIG_H -I. -I..  -g -O
2 -Wall -MT udphelper.o -MD -MP -MF .deps/udphelper.Tpo -c -o udphelper.o udphel
per.c
udphelper.c: In function `udphelper_ancillary_read':
udphelper.c:90: error: structure has no member named `ipi_spec_dst'
Makefile:316: recipe for target `udphelper.o' failed
make[2]: *** [udphelper.o] Error 1
make[2]: Leaving directory `/home/Steve/netcat/netcat/src'
Makefile:317: recipe for target `all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/Steve/netcat/netcat'
Makefile:257: recipe for target `all' failed
make: *** [all] Error 2

Steve@cfw5 ~/netcat/netcat
$



I have a look at autoreconf-2.68 which I suppose was meant to work earlier.. 
and it gives errors

$ autoreconf-2.68
m4/lbl-net.m4:36: warning: underquoted definition of AC_LBL_LIBRARY_NET
m4/lbl-net.m4:36:   run info '(automake)Extending aclocal'
m4/lbl-net.m4:36:   or see http://www.gnu.org/software/automake/manual/automake.
html#Extending-aclocal
autoreconf-2.68: configure.ac: AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VE
RSION







--
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: How do I build this program for Cygwin?

2012-05-05 Thread René Berber

On 5/5/2012 10:59 PM, Marilo wrote:

[snip]

$ autoconf-2.13
autoconf: configure.in: No such file or directory


You followed the wrong instructions.
--
René Berber


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