Re: Socket inheritance with fork/dup2/exec

2007-06-22 Thread Corinna Vinschen
On Jun 21 22:45, Jim Powers wrote:
> Hi,
> 
> I am redirecting the stdout of a child process to a socket via the standard 
> fork/dup2/exec paradigm and then reading and displaying the output.
> 
> This works fine if the exec'd child process is compiled using gcc under 
> cygwin. However, it fails with an "Invalid file handle" error when compiled 
> using VC8 under windows.
> 
> I've included both the parent and child code below.
> 
> I am running cygwin 1.5.24 and gcc3.4.4.

This is almost certainly a drawback of the method used for duplicating
sockets to child processes used in Cygwin 1.5.24 and before
(WSADuplicateSocket/WSASocket).  This only works reliable if the child
knows that the descriptor is a socket.  Usually server applications
using sockets don't duplicate the socket to the child processes, but
instead use pipes or pseudo terminals on the local connection, so that's
not a standard problem.

However, the next version of Cygwin will use standard DuplicateHandle
calls as for normal file handles.  Consequentially your
your test application appears to work with a Cygwin built from CVS:

  $ ./sock-cyg-win-parent ./sock-cyg-win-child.exe
  hellohellohellohellohello^C

You could try a developer snapshot from http://cygwin.com/snapshots/

As a workaround for Cygwin 1.5.x, use pipes, as already noted, or pseudo
terminals.


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: Help compiling gcc 4.2.0

2007-06-22 Thread Dave Korn
On 21 June 2007 21:47, Lee Rhodes wrote:


> I am struggling with the infamous unix/dos end-of-line '\r\n' vs '\n'
> incompatibilities.  It seems that no matter what shell I use (bash, sh,
> Cygwin, rxvt, dos) that the gnu make utility throws errors when it sees the
> '\r' CR character.
> 
>   Do I have to convert ALL the downloaded files into the unix format
> (dos2unix)? 

  Nope, what you have to do is you have to /not/ use winzip to unpack the
archives.  Use cygwin's command-line tar utility.


cheers,
  DaveK
-- 
Can't think of a witty .sigline today


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



[ANNOUNCEMENT] Updated: multitail-5.1.1-1: View one or multiple files like tail but with multiple windows.

2007-06-22 Thread Dr. Volker Zell
Hi

A new version of 'multitail' has been uploaded to a server near you.


Cygwin NEWS:


 * Update to latest upstream version


multitail NEWS:
===
  
 * errors in error popups would not fit sometimes
 * moving to the beginning of the first line when it is longer then the 
screenwidth would not work in scrollback
 * searching would not work when you were halfway a line in scrollback
 * searching in the scrollback window can now open a new window as well
 * removed 3 memoryleaks
 * added colorscheme for acpitail



DESCRIPTION:

MultiTail lets you view one or multiple files like the original tail
program. The difference is that it creates multiple windows on your
console (with ncurses). It can also monitor wildcards: if another file
matching the wildcard has a more recent modification date, it will
automatically switch to that file. That way you can, for example,
monitor a complete directory of files. Merging of 2 or even more
logfiles is possible. 
It can also use colors while displaying the logfiles (through regular
expressions), for faster recognition of what is important and what not.
Multitail can also filter lines (again with regular expressions) and
has interactive menus for editing given regular expressions and
deleting and adding windows. One can also have windows with the output
of shell scripts and other software. When viewing the output of 
external software, MultiTail can mimic the functionality of tools like
'watch' and such.


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

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

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

--
Dr. Volker Zell
volunteer cygwin multitail maintainer

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

[EMAIL PROTECTED]

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

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

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

--
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: Socket inheritance with fork/dup2/exec

2007-06-22 Thread Lev Bishop

On 6/22/07, Corinna Vinschen wrote:


However, the next version of Cygwin will use standard DuplicateHandle
calls as for normal file handles.  Consequentially your
your test application appears to work with a Cygwin built from CVS:


But MSDN says:
You should not use DuplicateHandle to duplicate handles to the
following objects:

* I/O completion ports. No error is returned, but the duplicate
handle cannot be used.
* Sockets. No error is returned, but the duplicate handle may not
be recognized by
Winsock at the target process. Also, using DuplicateHandle interferes
with internal reference  counting on the underlying object. To
duplicate a socket handle, use the
WSADuplicateSocket function.

--
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: cygrunsrv -S sshd fails not started

2007-06-22 Thread DePriest, Jason R.

On 6/21/07, KAYVEN RIESE  wrote:

On Thu, 21 Jun 2007, gga wrote:

> KAYVEN RIESE wrote:
>> On Thu, 21 Jun 2007, KAYVEN  RIESE wrote:
>>
>>>
>>> [EMAIL PROTECTED] ~
>>> $ cygrunsrv -S sshd
>>> cygrunsrv: Error starting a service: QueryServiceStatus:  Win32 error
>>> 1062:
>>> The service has not been started.
>>>
>
> Check /var/log/sshd.log.  There's probably more info why it failed there.
>
> You can also try starting the daemon manually for testing, as an
> administrator like (this will output more verbose info to the console):
>   > /usr/sbin/sshd -d -d -d -D

okay.  shoot.  i was able to connect but when i do the command
cygrunsrv -S sshd or the other one it still gives the same error.
how can i make this all happen automatically in the background so
i don't werry about it?  cron job or something? sheesh, but cygwin
is a little baby on top of windows or whatever.

>
> A common cause for that query problem is one of your config files having
> a wrong configuration, for example.
>
> P.S.  Installing openssh on cygwin has been nothing but a huge pain for
> me, as the docs are mostly worthless.
>
> --
> Gonzalo Garramuño
> [EMAIL PROTECTED]
>
> AMD4400 - ASUS48N-E
> GeForce7300GT
> Kubuntu Edgy
>


Hi everybody!  Your first mistake was following directions from two
sites that are not affiliated with Cygwin.  I think the pigtail site
even tells you not to ask for support on the Cygwin mailing lists if
you use his instructions.

Cygwin has excellent documentation for installing sshd right here:
/usr/share/doc/Cygwin/openssh.README in the folder where all of the
Cygwin specific docs for packages are kept.

The most important parts are these:
"If you are installing OpenSSH the first time, you can generate global
config files and server keys by running

  /usr/bin/ssh-host-config"
and
"You can create the private and public keys for a user now by running

 /usr/bin/ssh-user-config

under the users account."

-Jason

--
NOTICE:  This email is being sent in clear-text across the public
Internet.  Therefore, any attempts to include unenforceable legalese
restrictions are ridiculous and pointless.  If you can read this,
consider yourself authorized (whether I like it or not).

--
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 installation on Windows Server 2003

2007-06-22 Thread Robin Walker
--On 22 June 2007 17:18 +0100 DGFM-dfmsdev5b-Andrew Clark 
<[EMAIL PROTECTED]> wrote:



Additionally, is anyone aware of McaFee 8.0i causing Cygwin SSH problems
when installed on Windows Server 2003 - currently SSH keeps receiving the
message ' ssh_exchange_identification: Connection closed by remote host'
when issuing command 'ssh -v localhost'


Yes - turn off "Buffer Overflow Protection" in VirusScan Console.  That 
usually fixes it.


--
Robin Walker (Junior Bursar), Queens' College, Cambridge CB3 9ET, UK
[EMAIL PROTECTED]  http://www.queens.cam.ac.uk/  Tel:+44 1223 335528

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

2007-06-22 Thread Gary Johnson
On 2007-06-21, Dave wrote:
> Paul Mallas wrote:
> > Since we are on the topic - is there a way to do something similar
> > inside an open windows folder rather than from the folder icon?  I would
> > find that much more convenient.
> 
> This came up two years ago. Follow the thread from about here:
> 
> 
> 
> I haven't spent any further time on it, but will welcome any
> contributions :)

I've been playing with this for a while and am pretty happy with my 
solution.  I just haven't gotten around to posting it anywhere.  
What I've done is to create a normal shortcut in my SendTo folder 
that points to

   "C:\Documents and Settings\garyjohn\run_bash_here.bat"

"C:\Documents and Settings\garyjohn" happens to be my HOME and where 
I started playing with the bat file.  A better location would be 
C:\cygwin\usr\local\lib.

 run_bash_here.bat -
@echo off

REM Batch file to run a bash shell in the directory given by the batchfile
REM argument, %1.
REM
REM Gary Johnson
REM 2006-10-17

REM Save the current value of CYGWIN and add the 'noglob' option to allow us
REM to pass the %1 argument to a bash command  unchanged.
REM
set cygwin_save=%CYGWIN%
set CYGWIN=%CYGWIN% noglob

REM Use this form to run in a Command Prompt window.
REM
REM C:\cygwin\bin\bash --login -c "run_bash_here "'%1'

REM Use this form to run in an rxvt window.
REM
C:\cygwin\bin\rxvt.exe -e C:/cygwin/bin/bash --login -c "run_bash_here "'%1'" 
"'%cygwin_save%'


The 'run_bash_here' command needs to run in the environment of the 
login shell, so I implemented it as a function in my ~/.bashrc:

- run_bash_here() --
# Run a Cygwin bash interactive shell in a directory according to the
# argument.  If the argument is a directory, run the shell there.  If the
# argument is a file, run the shell in the parent directory.  The argument is
# the full path in Windows format.
#
run_bash_here() {

# Restore original value of CYGPATH.
#
CYGWIN="$2"

# Convert first argument to a Cygwin path.
#
path=$(cygpath -u "$1")

# If the path is not a directory, remove the last component.
#
if [ -d "$path" ]
then
dir="$path"
else
dir="${path%/*}"
fi

cd "$dir"
exec bash -i
}


I like it because it allows me to run a bash shell in the current 
directory, not just a sub-directory, and because I don't have to do 
any explicit manipulation of the registry.  I just wish there was an 
easier way for others to install it than:

   1.  Drop this batch file here.
   2.  Edit your ~/.bashrc to include this function.
   3.  Run the new SendTo shortcut wizard.

especially step 2.  Maybe I could just drop a file containing that 
function definition into /etc/profile.d.

Regards,
Gary

--
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: no vi editor??

2007-06-22 Thread Dave Korn
On 22 June 2007 17:46, KAYVEN RIESE wrote:

> On Fri, 22 Jun 2007, Dave Korn wrote:
> 
>> On 22 June 2007 17:33, KAYVEN RIESE wrote:
>> 
>>> [EMAIL PROTECTED] ~
>>> $ vi test
>>> bash: vi: command not found
>>> 
>>> [EMAIL PROTECTED] ~
>>> $
>>> aww man, u gotta be kidding!!!
>> 
>> 
>>  No, we don't gotta!  See "2.8. What packages should I download? Where are
>> 'make', 'gcc', 'vi', etc? " at
>> http://cygwin.com/faq/faq-nochunks.html#faq.setup.what-packages
>> 
> 
> but why? why wouldn't it be default??  {:(

  Because no matter what set of defaults anyone could possibly choose, it's
going to have things in it that some people don't want, and it's going to omit
things that some people do want.

  So the default for cygwin is a very minimal installation, just enough to get
the basic system up and running.  (This is also an important consideration for
people with slow/dialup net connections or who want to install cygwin to
somewhere with limited space such as a flash drive).  Everything else is
optional.

cheers,
  DaveK
-- 
Can't think of a witty .sigline today


--
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: cygrunsrv -S sshd fails not started

2007-06-22 Thread KAYVEN RIESE

On Fri, 22 Jun 2007, René Berber wrote:


KAYVEN RIESE wrote:
[snip]

$ cat sshd.log
/var/empty must be owned by root and not group or world-writable.

[snip]

Fix this if you want it to work normally; "root" in Cygwin means SYSTEM.



[EMAIL PROTECTED] /var/log
$ chown SYSTEM /var/empty

[EMAIL PROTECTED] /var/log
$ ls -l
total 3857
-rw-r--r--  1 kayve   None   276276 Jun 21 20:28 lastlog
-r-xr-x---+ 1 kayve   Users 3878110 Jun 21 17:04 setup.log
-r-xr-x---+ 1 kayve   Users3220 Jun 21 17:04 setup.log.full
-rw-r--r--  1 sshd_server None  670 Jun 21 20:29 sshd.log

[EMAIL PROTECTED] /var/log
$ ls -l /var
total 4
dr-xr-x---+ 3 kayve  Users0 Jun 14 18:27 cache
drwxr-xr-x+ 3 kayve  Users0 Jun 14 19:37 cron
drwxr-xr-x+ 2 SYSTEM None 0 Jun 21 16:38 empty
dr-xr-x---+ 3 kayve  Users0 Jun 14 18:25 lib
dr-xr-x---+ 2 kayve  Users 4096 Jun 20 12:42 log
dr-xr-x---+ 2 kayve  Users0 Jun 14 18:25 run
dr-xr-x---+ 2 kayve  Users0 Jun 14 18:25 tmp

[EMAIL PROTECTED] /var/log



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



*--*
  Kayven Riese, BSCS, MS (Physiology and Biophysics)
  (415) 902 5513 cellular
  http://kayve.net
  Webmaster http://ChessYoga.org
*--*
--
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: no vi editor??

2007-06-22 Thread KAYVEN RIESE

On Fri, 22 Jun 2007, Dave Korn wrote:


On 22 June 2007 17:33, KAYVEN RIESE wrote:


[EMAIL PROTECTED] ~
$ vi test
bash: vi: command not found

[EMAIL PROTECTED] ~
$
aww man, u gotta be kidding!!!



 No, we don't gotta!  See "2.8. What packages should I download? Where are
'make', 'gcc', 'vi', etc? " at
http://cygwin.com/faq/faq-nochunks.html#faq.setup.what-packages



but why? why wouldn't it be default??  {:(




   cheers,
 DaveK
--
Can't think of a witty .sigline today


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



*--*
  Kayven Riese, BSCS, MS (Physiology and Biophysics)
  (415) 902 5513 cellular
  http://kayve.net
  Webmaster http://ChessYoga.org
*--*

--
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 installation on Windows Server 2003

2007-06-22 Thread DePriest, Jason R.

On 6/22/07, DGFM-dfmsdev5b-Andrew Clark  wrote:

Hi,

Can anyone please confirm whether Cygwin 2.510.2.2 should be installed on
Windows Server 2003 only as a LOCAL ADMIN account, NOT a ADMIN USER or
DOMAIN ADMIN account ?



I have no idea what Cygwin 2.510.2.2 is.


Additionally, is anyone aware of McaFee 8.0i causing Cygwin SSH problems
when installed on Windows Server 2003 - currently SSH keeps receiving the
message ' ssh_exchange_identification: Connection closed by remote host'
when issuing command 'ssh -v localhost'


For "dodgy apps" see this thread in the archives:
http://cygwin.com/ml/cygwin-talk/2007-q1/msg00234.html



Many thanks in advance of your help.

Andy



If it is McAfee, my guess would be with the 'Access Protection' port
blocking feature.  If you can make changes to that, disable it or look
around its log or something.

-Jason


--
NOTICE:  This email is being sent in clear-text across the public
Internet.  Therefore, any attempts to include unenforceable legalese
restrictions are ridiculous and pointless.  If you can read this,
consider yourself authorized (whether I like it or not).

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



no vi editor??

2007-06-22 Thread KAYVEN RIESE



[EMAIL PROTECTED] ~
$ vi test
bash: vi: command not found

[EMAIL PROTECTED] ~
$


aww man, u gotta be kidding!!!

*--*
  Kayven Riese, BSCS, MS (Physiology and Biophysics)
  (415) 902 5513 cellular
  http://kayve.net
  Webmaster http://ChessYoga.org
*--*

--
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: cygrunsrv -S sshd fails not started

2007-06-22 Thread KAYVEN RIESE



On Fri, 22 Jun 2007, DePriest, Jason R. wrote:

On 6/21/07, KAYVEN RIESE  wrote:

On Thu, 21 Jun 2007, gga wrote:
> KAYVEN RIESE wrote:
>> On Thu, 21 Jun 2007, KAYVEN  RIESE wrote:
>>
>>>
>>> [EMAIL PROTECTED] ~
>>> $ cygrunsrv -S sshd
>>> cygrunsrv: Error starting a service: QueryServiceStatus:  Win32 error
>>> 1062:
>>> The service has not been started.
>>>
>
> Check /var/log/sshd.log.  There's probably more info why it failed there.
>
> You can also try starting the daemon manually for testing, as an
> administrator like (this will output more verbose info to the console):
>   > /usr/sbin/sshd -d -d -d -D

okay.  shoot.  i was able to connect but when i do the command
cygrunsrv -S sshd or the other one it still gives the same error.
how can i make this all happen automatically in the background so
i don't werry about it?  cron job or something? sheesh, but cygwin
is a little baby on top of windows or whatever.


The most important parts are these:
"If you are installing OpenSSH the first time, you can generate global
config files and server keys by running

 /usr/bin/ssh-host-config"
and
"You can create the private and public keys for a user now by running

/usr/bin/ssh-user-config




[EMAIL PROTECTED] /var/log
$ /usr/bin/ssh-host-config

There are still ssh processes running. Please shut them down first.


[EMAIL PROTECTED] /var/log
$ ps
  PIDPPIDPGID WINPID  TTY  UIDSTIME COMMAND
 1908   11908   19080 1000 14:41:29 /usr/bin/bash
I2912   12912   50521 1000 20:28:40 /usr/bin/bash
 426819084268   45800 1000 20:29:23 /usr/sbin/sshd
I4336   14336   43362 1000 09:26:00 /usr/bin/bash
 576019085760   41760 1000 09:33:35 /usr/bin/ps

(tried to connect with SSH client window, and failed)

[EMAIL PROTECTED] /var/log
$ debug1: fd 4 clearing O_NONBLOCK
debug1: Server will not fork when running in debugging mode.
debug3: send_rexec_state: entering fd = 7 config len 196
debug3: ssh_msg_send: type 0
debug3: send_rexec_state: done
debug1: rexec start in 4 out 4 newsock 4 pipe -1 sock 7

(hit ctrl-c)


[1]+  Exit 255/usr/sbin/sshd -d -d -d -D

[EMAIL PROTECTED] /var/log
$ kill 4268
bash: kill: (4268) - No such process

[EMAIL PROTECTED] /var/log
$ ps
  PIDPPIDPGID WINPID  TTY  UIDSTIME COMMAND
 1908   11908   19080 1000 14:41:29 /usr/bin/bash
I2912   12912   50521 1000 20:28:40 /usr/bin/bash
I4336   14336   43362 1000 09:26:00 /usr/bin/bash
 210019082100   44000 1000 09:37:34 /usr/bin/ps

[EMAIL PROTECTED] /var/log
$

[EMAIL PROTECTED] /var/log
$ /usr/bin/ssh-user-config

WARNING: group and other have been revoked write permission to your home
 directory /home/kayve.
 This is required by OpenSSH to allow public key authentication 
using

 the key files stored in your .ssh subdirectory.
 Revert this change ONLY if you know what you are doing!

Shall I create an SSH1 RSA identity file for you? (yes/no) yes
Generating /home/kayve/.ssh/identity
Enter passphrase (empty for no passphrase):

i am going to use a passphrase

okay, now i am not sure what command to use to start.. okay..
looking thru that file..


[EMAIL PROTECTED] /var/log
$ less /usr/share/doc/Cygwin/openssh.README

[EMAIL PROTECTED] /var/log
$

bizzare "more" doesn't werk, only "less"


Internet.  Therefore, any attempts to include unenforceable legalese
restrictions are ridiculous and pointless.  If you can read this,
consider yourself authorized (whether I like it or not).

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



*--*
  Kayven Riese, BSCS, MS (Physiology and Biophysics)
  (415) 902 5513 cellular
  http://kayve.net
  Webmaster http://ChessYoga.org
*--*

--
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 installation on Windows Server 2003

2007-06-22 Thread DGFM-dfmsdev5b-Andrew Clark
Hi,

Can anyone please confirm whether Cygwin 2.510.2.2 should be installed on
Windows Server 2003 only as a LOCAL ADMIN account, NOT a ADMIN USER or
DOMAIN ADMIN account ?

Additionally, is anyone aware of McaFee 8.0i causing Cygwin SSH problems
when installed on Windows Server 2003 - currently SSH keeps receiving the
message ' ssh_exchange_identification: Connection closed by remote host'
when issuing command 'ssh -v localhost'

Many thanks in advance of your help.

Andy

--
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: no vi editor??

2007-06-22 Thread Dave Korn
On 22 June 2007 17:33, KAYVEN RIESE wrote:

> [EMAIL PROTECTED] ~
> $ vi test
> bash: vi: command not found
> 
> [EMAIL PROTECTED] ~
> $
> 
> 
> aww man, u gotta be kidding!!!


  No, we don't gotta!  See "2.8. What packages should I download? Where are
'make', 'gcc', 'vi', etc? " at
http://cygwin.com/faq/faq-nochunks.html#faq.setup.what-packages



cheers,
  DaveK
-- 
Can't think of a witty .sigline today


--
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: no vi editor??

2007-06-22 Thread Larry Hall (Cygwin)

Dave Korn wrote:

On 22 June 2007 17:46, KAYVEN RIESE wrote:


On Fri, 22 Jun 2007, Dave Korn wrote:


On 22 June 2007 17:33, KAYVEN RIESE wrote:


[EMAIL PROTECTED] ~
$ vi test
bash: vi: command not found

[EMAIL PROTECTED] ~
$
aww man, u gotta be kidding!!!


 No, we don't gotta!  See "2.8. What packages should I download? Where are
'make', 'gcc', 'vi', etc? " at
http://cygwin.com/faq/faq-nochunks.html#faq.setup.what-packages


but why? why wouldn't it be default??  {:(


  Because no matter what set of defaults anyone could possibly choose, it's
going to have things in it that some people don't want, and it's going to omit
things that some people do want.

  So the default for cygwin is a very minimal installation, just enough to get
the basic system up and running.  (This is also an important consideration for
people with slow/dialup net connections or who want to install cygwin to
somewhere with limited space such as a flash drive).  Everything else is
optional.



And don't forget the oldie but goodie:



--
Larry Hall  http://www.rfk.com
RFK Partners, Inc.  (508) 893-9779 - RFK Office
216 Dalton Rd.  (508) 893-9889 - FAX
Holliston, MA 01746

_

A: Yes.
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting annoying in email?

--
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 installation on Windows Server 2003

2007-06-22 Thread Larry Hall (Cygwin)

DGFM-dfmsdev5b-Andrew Clark wrote:

Hi,

Can anyone please confirm whether Cygwin 2.510.2.2 should be installed on
Windows Server 2003 only as a LOCAL ADMIN account, NOT a ADMIN USER or
DOMAIN ADMIN account ?

Additionally, is anyone aware of McaFee 8.0i causing Cygwin SSH problems
when installed on Windows Server 2003 - currently SSH keeps receiving the
message ' ssh_exchange_identification: Connection closed by remote host'
when issuing command 'ssh -v localhost'

Many thanks in advance of your help.



If previous replies haven't resolved all your problems, let me suggest that
you follow the problem reporting guidelines outlined here:


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



--
Larry Hall  http://www.rfk.com
RFK Partners, Inc.  (508) 893-9779 - RFK Office
216 Dalton Rd.  (508) 893-9889 - FAX
Holliston, MA 01746

_

A: Yes.
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting annoying in email?

--
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: CVS 1.7.0 heap errors

2007-06-22 Thread Brian Ford
On Wed, 6 Jun 2007, Brian Ford wrote:

> FYI, I'm seeing the following errors quite often with current 1.7.0 CVS
> and have been for some time.  For instance, I can't use my CVS build to
> build Cygwin again.  I've yet to have time to investigate much, and don't
> see that changing for some time :-(.
>
>   6 [main] ? (1584) C:\cygwin\bin\make.exe: *** fatal error - couldn't
> allocate heap, Win32 error 487, base 0x68, top 0x6B, reserve_size
> 192512, allocsize 196608, page_const 4096
>  585603 [main] make 1736 fork: child -1 - died waiting for longjmp before
> initialization, retry 0, exit code 0x100, errno 11
>
> This is just in case any developer remembers a recent (within a couple of
> months) possibly related change.  If not, I'll try to binary search CVS
> as soon as my schedule frees up some.  Thanks.

I'm pretty sure I've identified the change, but I don't see any obvious
cause.  Corinna, do you have any suggestions about where to target or how
to specifically dig deeper?  Thanks.

http://cygwin.com/ml/cygwin-cvs/2007-q1/msg00139.html

-- 
Brian Ford
Lead Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
the best safety device in any aircraft is a well-trained crew...

--
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: no vi editor??

2007-06-22 Thread Christopher Faylor
On Fri, Jun 22, 2007 at 09:46:15AM -0700, KAYVEN RIESE wrote:
> On Fri, 22 Jun 2007, Dave Korn wrote:
>
>> On 22 June 2007 17:33, KAYVEN RIESE wrote:
>>
>>> [EMAIL PROTECTED] ~
>>> $ vi test
>>> bash: vi: command not found
>>>
>>> [EMAIL PROTECTED] ~
>>> $
>>> aww man, u gotta be kidding!!!
>>
>>
>>  No, we don't gotta!  See "2.8. What packages should I download? Where are
>> 'make', 'gcc', 'vi', etc? " at
>> http://cygwin.com/faq/faq-nochunks.html#faq.setup.what-packages
>>
>
> but why? why wouldn't it be default??  {:(

Because we don't like you and don't want you to be happy?

cgf

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Help compiling gcc 4.2.0

2007-06-22 Thread Gary Johnson
On 2007-06-22, Dave Korn wrote:
> On 21 June 2007 21:47, Lee Rhodes wrote:
> 
> 
> > I am struggling with the infamous unix/dos end-of-line '\r\n' vs '\n'
> > incompatibilities.  It seems that no matter what shell I use (bash, sh,
> > Cygwin, rxvt, dos) that the gnu make utility throws errors when it sees the
> > '\r' CR character.
> > 
> >   Do I have to convert ALL the downloaded files into the unix format
> > (dos2unix)? 
> 
>   Nope, what you have to do is you have to /not/ use winzip to unpack the
> archives.  Use cygwin's command-line tar utility.

I agree with the advice to use tar, but WinZip does have an option 
to fix this behavior.  From the menu bar, select

   Options -> Configuration -> Miscellaneous

Uncheck the "TAR file smart CR/LF conversion" box.  (Odd use of 
"smart".)  Click OK.

Regards,
Gary

--
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: Help compiling gcc 4.2.0

2007-06-22 Thread Larry Hall (Cygwin)

Gary Johnson wrote:

On 2007-06-22, Dave Korn wrote:

On 21 June 2007 21:47, Lee Rhodes wrote:



I am struggling with the infamous unix/dos end-of-line '\r\n' vs '\n'
incompatibilities.  It seems that no matter what shell I use (bash, sh,
Cygwin, rxvt, dos) that the gnu make utility throws errors when it sees the
'\r' CR character.

  Do I have to convert ALL the downloaded files into the unix format
(dos2unix)? 

  Nope, what you have to do is you have to /not/ use winzip to unpack the
archives.  Use cygwin's command-line tar utility.


I agree with the advice to use tar, but WinZip does have an option 
to fix this behavior.  From the menu bar, select


   Options -> Configuration -> Miscellaneous

Uncheck the "TAR file smart CR/LF conversion" box.  (Odd use of 
"smart".)  Click OK.



Cygwin's 'tar' enables other features you won't find in WinZip and often
need.  You're better off using Cygwin's 'tar' for unpacking source tar
files.

--
Larry Hall  http://www.rfk.com
RFK Partners, Inc.  (508) 893-9779 - RFK Office
216 Dalton Rd.  (508) 893-9889 - FAX
Holliston, MA 01746

_

A: Yes.
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting annoying in email?

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



fseek064 calling fflush on Cygwin

2007-06-22 Thread Brian Ford
I have an application that is having a 64-bit file I/O problem with Cygwin
1.7.0 CVS that it did not have with Cygwin 1.5.18.  I have tracked it
down to the following series of calls in newlib:

#0  fflush (fp=0x7b5a764)
at ../../../../../cygwin/newlib/libc/stdio/fflush.c:124
#1  0x611049ff in _fseeko64_r (ptr=0x16cbd008, fp=0x7b5a764,
offset=27368291304, whence=0)
at ../../../../../cygwin/newlib/libc/stdio64/fseeko64.c:326
#2  0x61104edf in fseeko64 (fp=0x7b5a764, offset=27368291304, whence=0)
at ../../../../../cygwin/newlib/libc/stdio64/fseeko64.c:350

(gdb) l 110
105  to make the change simpler, more contained, and less
likely
106  to miss a code scenario.  */
107   if ((fp->_r > 0 || fp->_ur > 0) && (seekfn = fp->_seek) !=
NULL)
108 {
109   _fpos_t curoff;
110
111   /* Get the physical position we are at in the file.  */
112   if (fp->_flags & __SOFF)
113 curoff = fp->_offset;
114   else
115 {
116   /* We don't know current physical offset, so ask for
it.  */
117   curoff = (*seekfn) (fp->_cookie, (_fpos_t) 0, SEEK_CUR);
118   if (curoff == -1L)
119 {
120   _funlockfile (fp);
121   return 0;
122 }
123 }
124   if (fp->_flags & __SRD)

(gdb) p/x fp->_offset
$12 = 0x65f468000
(gdb) ptype fp->_offset
type = long long int

(gdb) p/x curoff
$13 = 0x5f468000
(gdb) ptype curoff
type = long int

So, it would seem that fflush is not 64 bit safe and fseeko64 should not
be calling it, but I'm not sure how to fix it.

Any suggestions?

-- 
Brian Ford
Lead Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
the best safety device in any aircraft is a well-trained crew...

--
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: fseek064 calling fflush on Cygwin

2007-06-22 Thread Eric Blake
Brian Ford  FlightSafety.com> writes:

> 
> I have an application that is having a 64-bit file I/O problem with Cygwin
> 1.7.0 CVS that it did not have with Cygwin 1.5.18.  I have tracked it
> down to the following series of calls in newlib:
> 
> #0  fflush (fp=0x7b5a764)
> at ../../../../../cygwin/newlib/libc/stdio/fflush.c:124
> #1  0x611049ff in _fseeko64_r (ptr=0x16cbd008, fp=0x7b5a764,
> offset=27368291304, whence=0)
> at ../../../../../cygwin/newlib/libc/stdio64/fseeko64.c:326
> #2  0x61104edf in fseeko64 (fp=0x7b5a764, offset=27368291304, whence=0)
> at ../../../../../cygwin/newlib/libc/stdio64/fseeko64.c:350

Thanks for the report.  Prior to a couple months ago, this wasn't a problem, 
because fseek(f,0,SEEK_END) was mistakenly succeeding on large files.  This is 
fallout from my recent patch to make fseek properly fail with EOVERFLOW; but as 
you discovered, a side effect is that fflush is no longer seeking to the end 
the way it should be when it ignores the EOVERFLOW.

> 
> So, it would seem that fflush is not 64 bit safe and fseeko64 should not
> be calling it, but I'm not sure how to fix it.
> 
> Any suggestions?
> 

In environments with large files, fflush needs to check for __SL64, in which 
case it should call fp->_seek64, not fp->_seek.  That clinches it - I need to 
complete my patch to make fflush reentrant and 64-bit safe.  I'll hopefully 
have something by early next week.

-- 
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: Help compiling gcc 4.2.0

2007-06-22 Thread Lee Rhodes
Dave Korn  artimi.com> writes:

> 
>   Nope, what you have to do is you have to /not/ use winzip to unpack the
> archives.  Use cygwin's command-line tar utility.
> 
> cheers,
>   DaveK

Thanks!
Lee.



--
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: Question about Uninstalling Cygwin FAQ

2007-06-22 Thread Dan M
Hello,

Thank you for your quick response!  I've gotten a little further and
just have a couple more questions.

I entered cygrunsrv -L into C:\cygwin\bin and got the same error.  So I
am assuming I don't have cygrunsrv or any services loaded (if that's
wrong please let me know).  I also entered umount -A into C:\cygwin\bin
and got no response (only the next line's prompt (C:\cygwin\bin>) on the
next line appeared).

My questions:

1. Is it correct to enter umount -A into C:\cygwin\bin?
2. Does no response back from umount -A mean it worked?

Thanks again for your help.

Dan

-Original Message-
From: Bengt-Arne Fjellner [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 20, 2007 12:30 PM
To: Dan M; cygwin@cygwin.com
Subject: RE: Question about Uninstalling Cygwin FAQ


> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Dan M
> Sent: den 19 juni 2007 23:16
> To: cygwin@cygwin.com
> Subject: Question about Uninstalling Cygwin FAQ
> 
> Hello,
> 
> I am trying to uninstall all of Cygwin.  Per FAQs #17 and 
> #16, I did the
> following:
> 
> 1. Used the DOS cd command to set the Windows Command Prompt to
> C:\cygwin (which is where I installed it).
> 2. Entered cygrunsrv -L in the Windows Command Prompt to list the
> services I installed.  
> 
> After this I got error: 'cygrunsrv' is not recognized as an 
> internal or
> external command, operable program or batch file.
> 
> My questions:
> 
> 1. Is it correct to be entering this command in the Windows Command
> Prompt as I did?  If not, where should it be entered?

C:\cygwin\bin

> 2. Or is the error because cygrunsrv is not installed?

Possibly
> 3. If it is because cygrunsrv is not installed, how do I tell what
> services I installed?
No problem. No cygrunsrv=no services installed.

> 
> Thanks for your help.
> 
> Dan
> 


--
tel 0920 49 1894
Bengt-Arne Fjellner 
  



--
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: Socket inheritance with fork/dup2/exec

2007-06-22 Thread Jim Powers
Corinna,

I took your suggestion and downloaded the latest sanpshot (cygwin1-
20070616.dll) and that fixed the problem.  The Win32 version of the client 
compiled with VC8 now works fine.

Thanks!!

Jim

Corinna Vinschen <[EMAIL PROTECTED]> said:

> On Jun 21 22:45, Jim Powers wrote:
> > Hi,
> > 
> > I am redirecting the stdout of a child process to a socket via the 
standard 
> > fork/dup2/exec paradigm and then reading and displaying the output.
> > 
> > This works fine if the exec'd child process is compiled using gcc under 
> > cygwin. However, it fails with an "Invalid file handle" error when 
compiled 
> > using VC8 under windows.
> > 
> > I've included both the parent and child code below.
> > 
> > I am running cygwin 1.5.24 and gcc3.4.4.
> 
> This is almost certainly a drawback of the method used for duplicating
> sockets to child processes used in Cygwin 1.5.24 and before
> (WSADuplicateSocket/WSASocket).  This only works reliable if the child
> knows that the descriptor is a socket.  Usually server applications
> using sockets don't duplicate the socket to the child processes, but
> instead use pipes or pseudo terminals on the local connection, so that's
> not a standard problem.
> 
> However, the next version of Cygwin will use standard DuplicateHandle
> calls as for normal file handles.  Consequentially your
> your test application appears to work with a Cygwin built from CVS:
> 
>   $ ./sock-cyg-win-parent ./sock-cyg-win-child.exe
>   hellohellohellohellohello^C
> 
> You could try a developer snapshot from http://cygwin.com/snapshots/
> 
> As a workaround for Cygwin 1.5.x, use pipes, as already noted, or pseudo
> terminals.
> 
> 
> 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/
> 



-- 
Jim Powers
Powers Consulting Services, Inc.
[EMAIL PROTECTED]
937-271-5523



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