Re: problem with nc 1.107-4

2017-03-30 Thread David Balažic
On 30 March 2017 at 04:24, 高锋  wrote:
> I just installed the latest nc 1.107-4 on windows 7 platform.When lauched
> the command like:
> nc -vuz 10.31.28.188 6110
> ,each time it reported connecting successed,even if the target ip
> 10.31.28.188 does not really exists.

What exactly does it say?
Because with UDP there are no connections, so there can not be any
successful connection.

Regards,
David

--
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: reply: problem with nc 1.107-4

2017-03-30 Thread Michael Enright
On Wed, Mar 29, 2017 at 11:28 PM, 高锋 wrote:
> Two days ago,i wanted to determine whether a udp port of another machine is 
> open or not, which is deployed on different subnet.
> But windows platform does not provide utility that can dose this.So i 
> downloaded a setup.exe from cygwin,of which version is 2.877(64 bit),and i 
> had never use this utility before.

I tried this command on Debian 8.7. My conclusion is that this didn't
tell me that the UDP port is listened to by another machine. I used
your exact command, which had similarly uninformative results as
yours. There is no 10.31.x.x machine that I can reach, yet 'nc -u'
allowed me to send text to that address and port. Strace of 'nc -uz'
showed that the special -z option (zero i/o port scan) code "sent
successfully" a single byte to the destination, even though it doesn't
exist.

I conclude that "nc -uz" can't be used to determine unambiguously if a
UDP host is available, because it will succeed even if the host is not
present. And that carries to all systems that use the same 'nc'
utility as Debian or Cygwin.

--
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: reply: problem with nc 1.107-4

2017-03-30 Thread Andrey Repin
Greetings, 高锋!

Please don' top-post. Thank you.

> Two days ago,i wanted to determine whether a udp port of another machine is
> open or not, which is deployed on different subnet.
> But windows platform does not provide utility that can dose this.So i
> downloaded a setup.exe from cygwin,of which version is 2.877(64 bit),and i 
> had never use this utility before.

UDP protocol is inherently stateless.
You can't determine remote port state unless it explicitly reported (i.e.
answers to the messages sent on that port).


-- 
With best regards,
Andrey Repin
Thursday, March 30, 2017 19:36:15

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: reply: problem with nc 1.107-4

2017-03-30 Thread Brian Inglis
On 2017-03-30 10:44, Michael Enright wrote:
> On Wed, Mar 29, 2017 at 11:28 PM, 高锋 wrote:
>> Two days ago, I wanted to determine whether a udp port of another 
>> machine is open or not, which is deployed on different subnet. But
>> Windows platform does not provide utility that can do this. So I
>> downloaded a setup.exe from cygwin, of which version is 2.877 (64 
>> bit), and I had never used this utility before.
> 
> I tried this command on Debian 8.7. My conclusion is that this didn't
> tell me that the UDP port is listened to by another machine. I used
> your exact command, which had similarly uninformative results as
> yours. There is no 10.31.x.x machine that I can reach, yet 'nc -u'
> allowed me to send text to that address and port. Strace of 'nc -uz'
> showed that the special -z option (zero i/o port scan) code "sent
> successfully" a single byte to the destination, even though it 
> doesn't exist.
> 
> I conclude that "nc -uz" can't be used to determine unambiguously if
> a UDP host is available, because it will succeed even if the host is
> not present. And that carries to all systems that use the same 'nc' 
> utility as Debian or Cygwin.

man nc CAVEATS says -uz always reports success and suggests how it 
could be used.

nc is used, instead of a network daemon, as a patient network pipe that 
can be used to move arbitrary bytes, without having to previously set 
up direct routes between systems or daemons to handle specific types of 
connections e.g. if you have sshd set up on a target system, and a 
route to it, you may do:

src $ tar -cf - -C /export/mnt/home . | ssh dest tar -xf - -C /nfs/home

with nc if you don't have any direct route to the target or sshd set up 
still you may do:

 dest $ nc -dl 9000 | tar -xf - -C /nfs/home

inter $ nc -dl 9000 | nc 10.123.456.789 9000

  src $ tar -cf - -C /export/mnt/home . | nc 192.168.123.456 9000

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

--
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 to ulimit virtual memory on Cygwin-64 processes?

2017-03-30 Thread Dan Bonachea
Is there a way to get ulimit-style virtual memory limit enforcement on
64-bit Cygwin processes?

I'm a programmer and occasionally I have a bug that sends a process
into a memory-grabbing tail-spin. On 32-bit Cygwin, such a runaway
process gets stopped cold at 4GB VM (and usually crashes), but 4GB is
well short of the physical memory on my 64-bit windows system so this
doesn't affect my system stability.

However a similar runaway process on 64-bit Cygwin is easily capable
of grabbing nearly all of the memory on my system, which can lead to
Very Bad Things - ie unrelated user processes start crashing, desktop
window manager disappears, and the system slows to a crawl or freezes
entirely - making it difficult or impossible to kill the run-away.
Several times now I've had to hard power-cycle to recover from such a
Cygwin-64 runaway memory-grabbing process, and have lost some data as
a result.

You can replicate this behavior with a very simple program: (however I
DON'T recommend running this)

#include 
#include 

int main() {
  printf("WARNING: I'm stealing all your memory, hit control-c to
cancel!!!\n");fflush(0);
  while(1) malloc(1e6);
  return 0;
}

The traditional POSIX solution to this problem is setrlimit() aka bash
ulimit, but that does not appear to be implemented in Cygwin 2.7.0:

$ ulimit -a
core file size  (blocks, -c) unlimited
data seg size   (kbytes, -d) unlimited
file size   (blocks, -f) unlimited
open files  (-n) 256
pipe size(512 bytes, -p) 8
stack size  (kbytes, -s) 2036
cpu time   (seconds, -t) unlimited
max user processes  (-u) 256
virtual memory  (kbytes, -v) unlimited

$ ulimit -v 1048576
bash: ulimit: virtual memory: cannot modify limit: Invalid argument

Is there any hidden setting or other way to enforce a reasonable VM /
heap memory / page commit limit on 64-bit Cygwin processes (or even
all windows processes) via some other mechanism? I'm running Windows 7
Pro.

I've searched the Cygwin mailing list archives, user guide, FAQ, and
Google and not found a suitable answer. I've tried the peflags utility
mentioned in the Cygwin user guide, but that doesn't seem capable of
doing what I need, even for a single executable (although ideally I
want to enforce a system-wide limit).

Thanks for your consideration.

-Dan Bonachea

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



[ANNOUNCEMENT] ruby-rdtool 0.6.38-3

2017-03-30 Thread Yaakov Selkowitz
The following packages have been uploaded to the Cygwin distribution:

* ruby-rdtool-0.6.38-3
* ruby-rdtool-doc-0.6.38-3

RD is multipurpose documentation format created for documentating Ruby and 
output of Ruby world. You can embed RD into Ruby script. And RD has neat 
syntax which help you to read document in Ruby script. On the other hand, 
RD have a feature for class reference.

This is a rebuilt for Ruby 2.x, replacing the former 'rdtool' package.

--
Yaakov

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



[ANNOUNCEMENT] swig 3.0.12-1

2017-03-30 Thread Yaakov Selkowitz
The following packages have been uploaded to the Cygwin distribution:

* swig-3.0.12-1

SWIG reads annotated C/C++ header files and creates wrapper code (glue 
code) in order to make the corresponding C/C++ libraries available to the 
listed languages, or to extend C/C++ programs with a scripting language.

This is an update to the latest upstream release.

--
Yaakov

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



[ANNOUNCEMENT] mediainfo 0.7.93-1

2017-03-30 Thread Yaakov Selkowitz
The following packages have been uploaded to the Cygwin distribution:

* mediainfo-0.7.93-1
* mediainfo-gui-0.7.93-1
* mediainfo-qt-0.7.93-1
* libmediainfo0-0.7.93-1
* libmediainfo-devel-0.7.93-1

MediaInfo is a convenient unified display of the most relevant technical 
and tag data for video and audio files.

This is an update to the latest upstream release.  mediainfo-gui has been
switched to wxWidgets 3.0.

--
Yaakov

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



[ANNOUNCEMENT] wxWidgets3.0 3.0.2.0-3

2017-03-30 Thread Yaakov Selkowitz
The following packages have been uploaded to the Cygwin distribution:

* libwx_baseu3.0_0-3.0.2.0-3
* libwx_baseu3.0-devel-3.0.2.0-3
* libwx_gtk2u3.0_0-3.0.2.0-3
* libwx_gtk2u3.0-devel-3.0.2.0-3
* libwx_gtk3u3.0_0-3.0.2.0-3
* libwx_gtk3u3.0-devel-3.0.2.0-3
* python2-wx-3.0.2.0-3
* python2-wxversion-3.0.2.0-3
* wxWidgets3.0-doc-3.0.2.0-3

wxWidgets is a set of libraries that allows C++ applications to compile and 
run on several different types of computer, with minimal source code 
changes. There is one library per supported GUI. As well as providing a 
common API for GUI functionality, it provides functionality for accessing 
some commonly-used operating system facilities, from copying and deleting 
files to socket and thread support.

This release adds the gtk3 backend as the default, while keeping the gtk2
backend for software which doesn't yet work properly with the gtk3 backend.
The MediaCtrl widget has been added for both backends.

--
Yaakov

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



[ANNOUNCEMENT] poedit 1.8.12-1

2017-03-30 Thread Yaakov Selkowitz
The following packages have been uploaded to the Cygwin distribution:

* poedit-1.8.12-1

poEdit is cross-platform gettext catalogs (.po files) editor. It aims to 
provide more convenient approach to editing catalogs than launching vi and 
editing the file by hand.

This is an update to the latest upstream stable release, and has been 
switched to the gtk3 backend.

--
Yaakov

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



[ANNOUNCEMENT] ncurses 6.0-10.20170325

2017-03-30 Thread Yaakov Selkowitz
The following packages have been uploaded to the Cygwin distribution:

* ncurses-6.0-10.20170325
* ncurses-demo-6.0-10.20170325
* libncursesw10-6.0-10.20170325
* libncurses-devel-6.0-10.20170325
* terminfo-6.0-10.20170325
* terminfo-extra-6.0-10.20170325
* mingw64-i686-ncurses-6.0-10.20170325
* mingw64-x86_64-ncurses-6.0-10.20170325

Ncurses (new curses) started as a freely distributable clone of SVr4 
curses. It has outgrown the clone description, and now contains many 
features which are not in SVr4 curses. Curses is a pun on the term <>. It is a library of functions that manage an application's 
display on character-cell terminals (e.g., VT100).

This is an update to the latest upstream patchset.

--
Yaakov

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



[ANNOUNCEMENT] vim 8.0.0525-1

2017-03-30 Thread Yaakov Selkowitz
The following packages have been uploaded to the Cygwin distribution:

* vim-8.0.0525-1
* vim-common-8.0.0525-1
* vim-minimal-8.0.0525-1
* gvim-8.0.0525-1
* xxd-8.0.0525-1
* vim-doc-8.0.0525-1

Vim (Vi IMproved) is an almost compatible version of the UNIX editor vi. 
Almost every possible command can be performed using only ASCII characters. 
Many new features have been added: multilevel undo, command line history, 
file name completion, block operations, and editing of binary data.

This is an update to yesterday's patchset.  The reported issue with errors
launching /bin/vi when vim-common is installed are not yet fixed.

--
Yaakov

--
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: Cygwin Time Machine has moved

2017-03-30 Thread Larry Hall (Cygwin)

On 03/28/2017 04:46 PM, Peter A. Castro wrote:

Greetings, All,
   First, my apologies in advance if this is considered off-topic, or
unwelcome in some way...


Unwelcome?  I find it shocking!  Imagine, the audacity of providing this
service to the Cygwin community for all these years and to now improve on
it.  I'm beside myself!  Someone needs to give Peter a gold star (or three!)
otherwise he's just going to continue to do these outrageous things.  This
simply must stop!

--
Larry

PS - This is really awesome. :-)  Thank you Peter!
_

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

--
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: Various packages rebuilt for dependencies

2017-03-30 Thread Chad Dougherty

Confirmed, so long as vim-common is installed. I tried today's
patchset and the same occurs. Please report upstream, and feel free
to CC: me on it.


https://github.com/vim/vim/issues/1604

--
-Chad

--
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: problem with nc 1.107-4

2017-03-30 Thread gaofeng
The manual saying:

NC(1) BSD General Commands ManualNC(1)

NAME
 nc — arbitrary TCP and UDP connections and listens

SYNOPSIS
 nc [-46CDdhklnrStUuvz] [-I length] [-i interval] [-O length]
[-P proxy_username] [-p source_port] [-s source] [-T toskeyword]
[-V rtable] [-w timeout] [-X proxy_protocol] [-x proxy_address[:port]]
[destination] [port]

DESCRIPTION
 The nc (or netcat) utility is used for just about anything under the sun
 involving TCP, UDP, or UNIX-domain sockets.  It can open TCP connections,
 send UDP packets, listen on arbitrary TCP and UDP ports, do port scan‐
 ning, and deal with both IPv4 and IPv6.  Unlike telnet(1), nc scripts
 nicely, and separates error messages onto standard error instead of
 sending them to standard output, as telnet(1) does with some.
 
 -u  Use UDP instead of the default option of TCP.  For UNIX-domain
 sockets, use a datagram socket instead of a stream socket.  If a
 UNIX-domain socket is used, a temporary receiving socket is cre‐
 ated in /tmp unless the -s flag is given.

PORT SCANNING
 It may be useful to know which ports are open and running services on a
 target machine.  The -z flag can be used to tell nc to report open ports,
 rather than initiate a connection.  For example:

EXAMPLES
 Open a UDP connection to port 53 of host.example.com:

   $ nc -u host.example.com 53

-Original Message-
From: cygwin-ow...@cygwin.com [mailto:cygwin-ow...@cygwin.com] On Behalf Of 
David Bala?ic
Sent: Thursday, March 30, 2017 10:58 PM
To: cygwin@cygwin.com
Subject: Re: problem with nc 1.107-4

On 30 March 2017 at 04:24, 高锋  wrote:
> I just installed the latest nc 1.107-4 on windows 7 platform.When 
> lauched the command like:
> nc -vuz 10.31.28.188 6110
> ,each time it reported connecting successed,even if the target ip
> 10.31.28.188 does not really exists.

What exactly does it say?
Because with UDP there are no connections, so there can not be any successful 
connection.

Regards,
David

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




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