Re: pthread_kill: signals remain pending after target thread exits

2015-11-02 Thread Corinna Vinschen
On Oct 29 16:16, John Carey wrote:
> > From: Corinna Vinschen [corinna-cyg...@cygwin.com]
> > Sent: Thursday, October 29, 2015 1:02 AM
> > On Oct 28 10:14, Corinna Vinschen wrote:
> ...
> > > > Thanks; that was fast!  I tried replacing cygwin1.dll with 
> > > > cygwin1-20151023.dll .
> > > >
> > > > The original test case now works.  I checked some of my other tests,
> > > > and unfortunately some of them failed, so I extracted out a new test
> > > > case, which is attached.  My guess is that something is subtly different
> > > > about the timing on this test.
> > >
> > > Is this a regression?  Did it work with 2.2.1?
> > 
> > Answering myself here, this didn't work at all in 2.2.1.  I can
> > reproduce the problem and I'm going to take a look.  Not sure if
> > there's a quick solution, though.  This looks like a deadlock
> > situation.  The signal definitely got send, I just don't see yet
> > why it's not handled in wait_sig.
> 
> Yes, test_pending_signal2.c fails in 2.2.1, though the symptoms
> differ: there is no Cygwin process left hanging that cannot be
> killed by a Cygwin signal.
> 
> But both tests appear to pass in Cygwin 1.7.9, so in that sense
> it is a regression, just not a recent one.

The regression here was my original fix.  It didn't clear pending
signals for an exiting thread thorougly enough.  I applied a patch now
which should fix this issue.  I'll upload a new developer snapshot to
https://cygwin.com/snapshots/ later today or tomorrow (still looking
into the PrlFS issue).  Please give it a try.


Thanks,
Corinna

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


pgpGpEDSC_DJX.pgp
Description: PGP signature


Re: Randomly hang when compiling Cygwin on Cygwin on Wine

2015-11-02 Thread Corinna Vinschen
On Nov  2 03:08, Qian Hong wrote:
> Update:
> 
> I have another case of hang:
> 
> ?(1)-+-bash(1419290)
>  |-bash(1419318)---make(1423770)---sh(1423783)---sh(1423838)
>  |-mintty(1249269)---bash(1249277)
>  
> |-mintty(47)---bash(55)---bash(1132827)---make(1139169)---sh(1139182)---make(1139234)---sh(1206695)---sh(1206721)---make(1206764)---sh(1206770)---make(1206783)---perl(1249042)
>  |-mintty(596773)---bash(596790)---pstree(1423865)
>  `-mintty(1417449)---bash(1417457)
> 
> 
> $ ps aux | grep 1249042
>   1249042 1206783 11328271249050  pty0  197608   Oct 31 /usr/bin/perl
>   1249077 1249042 11328271249092  pty0  197608   Oct 31
> /usr/bin/nm 
> 
> 
> 
> Here the process perl(1249042) is waiting for a pipe, while its child
> process nm(1249077) is in the status "defunct". nm(1249077) appears in
> output of `ps aux`, but doesn't appear in output of `pstree -p -l`.
> 
> Is there any case, where a child process can exit unexpected, but the
> parent process still incorrectly wait for the child process forever?

I don't answer this question conclusively before consulting my lawyer.
It *might* be possible.  See fhandler_base_overlapped::close(),
fhandler_base_overlapped::check_later() and flush_async_io(), all three
in fhandler.cc.

No, I'm not happy with using overlapped IO for pipes.  I'd prefer to use
nonblocking pipes instead, but the most required resource to fix this,
which is least available, is time :(


Corinna

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


pgp6kfIM6T8sS.pgp
Description: PGP signature


[newlib-cygwin/cygwin-acl] Avoid double unlock of TLS mutex

2015-11-02 Thread Corinna Vinschen
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=b5fe9309b27a3ee0e208738a41cabf83343a326d

commit b5fe9309b27a3ee0e208738a41cabf83343a326d
Author: Corinna Vinschen 
Date:   Fri Oct 30 17:21:30 2015 +0100

Avoid double unlock of TLS mutex

* exceptions.cc (sigpacket::process): Avoid potentially double unlocking
the TLS mutex.

Signed-off-by: Corinna Vinschen 

Diff:
---
 winsup/cygwin/ChangeLog | 5 +
 winsup/cygwin/exceptions.cc | 5 +
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index b4b0f69..255d795 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,10 @@
 2015-10-30  Corinna Vinschen  
 
+   * exceptions.cc (sigpacket::process): Avoid potentially double unlocking
+   the TLS mutex.
+
+2015-10-30  Corinna Vinschen  
+
* signal.cc (sigwait): Fix return value to reflect errno in case of
error according to POSIX.  Never return EINTR.
* thread.cc (pthread_kill): Return errno if sig_send failed.
diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc
index 60f09d6..9119a8c 100644
--- a/winsup/cygwin/exceptions.cc
+++ b/winsup/cygwin/exceptions.cc
@@ -1475,10 +1475,7 @@ sigpacket::process ()
  else if (!sigismember (>sigmask, si.si_signo))
issig_wait = false;
  else
-   {
- cygheap->unlock_tls (tl_entry);
- tls = NULL;
-   }
+   tls = NULL;
}
 }


[newlib-cygwin/cygwin-acl] Add support for Parallels Desktop FS (prlfs)

2015-11-02 Thread Corinna Vinschen
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=dad28a9a17a862605b3b5a5ed2c1918f8d6d6793

commit dad28a9a17a862605b3b5a5ed2c1918f8d6d6793
Author: Corinna Vinschen 
Date:   Mon Nov 2 12:08:25 2015 +0100

Add support for Parallels Desktop FS (prlfs)

* mount.h (enum fs_info_type): Add prlfs (Parallels Desktop FS).
(class fs_info): Add has_broken_fnoi flag.  Implement prlfs FS flag.
* mount.cc (fs_info::update): Handle PrlFS.  Fill new has_broken_fnoi
flag with life.
(fs_names): Add prlfs.
* globals.cc (ro_u_prlfs): Define.
* path.h (path_conv::has_broken_fnoi): New method.
* path.cc (symlink_info::check): Call file_get_fnoi utilizing new
has_broken_fnoi filesystem flag.
* fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Ditto.

* new-features.xml (ov-new2.3): Document Parallels Desktop FS support.

Signed-off-by: Corinna Vinschen 

Diff:
---
 winsup/cygwin/ChangeLog | 13 +
 winsup/cygwin/fhandler_disk_file.cc |  2 +-
 winsup/cygwin/globals.cc|  1 +
 winsup/cygwin/mount.cc  | 10 --
 winsup/cygwin/mount.h   |  6 +-
 winsup/cygwin/path.cc   |  3 ++-
 winsup/cygwin/path.h|  1 +
 winsup/cygwin/release/2.3.0 |  2 ++
 winsup/doc/ChangeLog|  4 
 winsup/doc/new-features.xml |  4 
 10 files changed, 41 insertions(+), 5 deletions(-)

diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index ba11e0c..cd4de37 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,16 @@
+2015-11-02  Corinna Vinschen  
+
+   * mount.h (enum fs_info_type): Add prlfs (Parallels Desktop FS).
+   (class fs_info): Add has_broken_fnoi flag.  Implement prlfs FS flag.
+   * mount.cc (fs_info::update): Handle PrlFS.  Fill new has_broken_fnoi
+   flag with life.
+   (fs_names): Add prlfs.
+   * globals.cc (ro_u_prlfs): Define.
+   * path.h (path_conv::has_broken_fnoi): New method.
+   * path.cc (symlink_info::check): Call file_get_fnoi utilizing new
+   has_broken_fnoi filesystem flag.
+   * fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Ditto.
+
 2015-10-30  Corinna Vinschen  
 
* nlsfuncs.cc (__get_lcid_from_locale): Handle LocaleNameToLCID
diff --git a/winsup/cygwin/fhandler_disk_file.cc 
b/winsup/cygwin/fhandler_disk_file.cc
index 4885885..cf87d2c 100644
--- a/winsup/cygwin/fhandler_disk_file.cc
+++ b/winsup/cygwin/fhandler_disk_file.cc
@@ -416,7 +416,7 @@ fhandler_base::fstat_by_handle (struct stat *buf)
  on the information stored in pc.fnoi.  So we overwrite them here. */
   if (get_io_handle ())
 {
-  status = file_get_fnoi (h, pc.fs_is_netapp (), pc.fnoi ());
+  status = file_get_fnoi (h, pc.has_broken_fnoi (), pc.fnoi ());
   if (!NT_SUCCESS (status))
{
 debug_printf ("%y = NtQueryInformationFile(%S, "
diff --git a/winsup/cygwin/globals.cc b/winsup/cygwin/globals.cc
index 09c08f2..7a17376 100644
--- a/winsup/cygwin/globals.cc
+++ b/winsup/cygwin/globals.cc
@@ -138,6 +138,7 @@ extern "C" {
   extern UNICODE_STRING _RDATA ro_u_mvfs = _ROU (L"MVFS");
   extern UNICODE_STRING _RDATA ro_u_nfs = _ROU (L"NFS");
   extern UNICODE_STRING _RDATA ro_u_ntfs = _ROU (L"NTFS");
+  extern UNICODE_STRING _RDATA ro_u_prlfs = _ROU (L"PrlSF"); /* No typo! */
   extern UNICODE_STRING _RDATA ro_u_refs = _ROU (L"ReFS");
   extern UNICODE_STRING _RDATA ro_u_sunwnfs = _ROU (L"SUNWNFS");
   extern UNICODE_STRING _RDATA ro_u_udf = _ROU (L"UDF");
diff --git a/winsup/cygwin/mount.cc b/winsup/cygwin/mount.cc
index 6cf3ddf..01f1759 100644
--- a/winsup/cygwin/mount.cc
+++ b/winsup/cygwin/mount.cc
@@ -1,7 +1,7 @@
 /* mount.cc: mount handling.
 
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-   2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Red Hat, Inc.
+   2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Red Hat, Inc.
 
 This file is part of Cygwin.
 
@@ -370,7 +370,8 @@ fs_info::update (PUNICODE_STRING upath, HANDLE in_vol)
  && !is_unixfs (RtlEqualUnicodeString (, _u_unixfs, FALSE))
  /* AFSRDRFsd == Andrew File System.  Doesn't support DOS attributes.
 Only native symlinks are supported. */
- && !is_afs (RtlEqualUnicodeString (, _u_afs, FALSE)))
+ && !is_afs (RtlEqualUnicodeString (, _u_afs, FALSE))
+ && !is_prlfs (RtlEqualUnicodeString (, _u_prlfs, FALSE)))
{
  /* Known remote file system with buggy open calls.  Further
 explanation in fhandler.cc (fhandler_disk_file::open_fs). */
@@ -402,6 +403,10 @@ fs_info::update (PUNICODE_STRING upath, HANDLE in_vol)
 only support this if the filename is non-null and the handle is
 the handle to a directory. NcFsd IR10 

[newlib-cygwin/cygwin-acl] Remove spurious execute permissions from some Cygwin source and text files

2015-11-02 Thread Corinna Vinschen
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=6f7c46e915f616f513fa996f33fca8e6eb902144

commit 6f7c46e915f616f513fa996f33fca8e6eb902144
Author: Jon Turney 
Date:   Tue Oct 27 13:45:08 2015 +

Remove spurious execute permissions from some Cygwin source and text files

2015-08-21  Jon Turney  

* cygwin-cxx.h: Remove execute permissions.
* fenv.cc: Ditto.
* how-startup-shutdown-works.txt: Ditto.
* include/arpa/nameser.h: Ditto.
* include/arpa/nameser_compat.h: Ditto.
* include/fenv.h: Ditto.
* include/resolv.h: Ditto.
* libstdcxx_wrapper.cc: Ditto.

2015-10-27  Jon Turney  

* winsup.api/signal-into-win32-api.c: Remove execute permissions.

Signed-off-by: Jon Turney 

Diff:
---
 winsup/cygwin/ChangeLog | 11 +++
 winsup/cygwin/cygwin-cxx.h  |  0
 winsup/cygwin/fenv.cc   |  0
 winsup/cygwin/how-startup-shutdown-works.txt|  0
 winsup/cygwin/include/arpa/nameser.h|  0
 winsup/cygwin/include/arpa/nameser_compat.h |  0
 winsup/cygwin/include/fenv.h|  0
 winsup/cygwin/include/resolv.h  |  0
 winsup/cygwin/libstdcxx_wrapper.cc  |  0
 winsup/testsuite/ChangeLog  |  4 
 winsup/testsuite/winsup.api/signal-into-win32-api.c |  0
 11 files changed, 15 insertions(+)

diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 696a435..0be6410 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,14 @@
+2015-08-21  Jon Turney  
+
+   * cygwin-cxx.h: Remove execute permissions.
+   * fenv.cc: Ditto.
+   * how-startup-shutdown-works.txt: Ditto.
+   * include/arpa/nameser.h: Ditto.
+   * include/arpa/nameser_compat.h: Ditto.
+   * include/fenv.h: Ditto.
+   * include/resolv.h: Ditto.
+   * libstdcxx_wrapper.cc: Ditto.
+
 2015-10-23  Corinna Vinschen  
 
* cygtls.cc (_cygtls::remove): Call remove_pending_sigs.
diff --git a/winsup/cygwin/cygwin-cxx.h b/winsup/cygwin/cygwin-cxx.h
old mode 100755
new mode 100644
diff --git a/winsup/cygwin/fenv.cc b/winsup/cygwin/fenv.cc
old mode 100755
new mode 100644
diff --git a/winsup/cygwin/how-startup-shutdown-works.txt 
b/winsup/cygwin/how-startup-shutdown-works.txt
old mode 100755
new mode 100644
diff --git a/winsup/cygwin/include/arpa/nameser.h 
b/winsup/cygwin/include/arpa/nameser.h
old mode 100755
new mode 100644
diff --git a/winsup/cygwin/include/arpa/nameser_compat.h 
b/winsup/cygwin/include/arpa/nameser_compat.h
old mode 100755
new mode 100644
diff --git a/winsup/cygwin/include/fenv.h b/winsup/cygwin/include/fenv.h
old mode 100755
new mode 100644
diff --git a/winsup/cygwin/include/resolv.h b/winsup/cygwin/include/resolv.h
old mode 100755
new mode 100644
diff --git a/winsup/cygwin/libstdcxx_wrapper.cc 
b/winsup/cygwin/libstdcxx_wrapper.cc
old mode 100755
new mode 100644
diff --git a/winsup/testsuite/ChangeLog b/winsup/testsuite/ChangeLog
index e9cff49..2e6ed54 100644
--- a/winsup/testsuite/ChangeLog
+++ b/winsup/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2015-10-27  Jon Turney  
+
+   * winsup.api/signal-into-win32-api.c: Remove execute permissions.
+
 2014-08-15  Corinna Vinschen  
 
* configure.ac: Convert to new AC_INIT style.
diff --git a/winsup/testsuite/winsup.api/signal-into-win32-api.c 
b/winsup/testsuite/winsup.api/signal-into-win32-api.c
old mode 100755
new mode 100644


[newlib-cygwin/cygwin-acl] Fix incorrect implementation to clear per-thread pending signals

2015-11-02 Thread Corinna Vinschen
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=93efa5f273d963649da6ab31ef0b8c5c5071a6e9

commit 93efa5f273d963649da6ab31ef0b8c5c5071a6e9
Author: Corinna Vinschen 
Date:   Mon Nov 2 13:53:25 2015 +0100

Fix incorrect implementation to clear per-thread pending signals

* sigproc.cc (class pending_signals): Drop sigproc_init friendship.
(pending_signals::clear): Fix implementation to avoid subsequent
endless loop in wait_sig.  Improve comment.

Signed-off-by: Corinna Vinschen 

Diff:
---
 winsup/cygwin/ChangeLog  |  6 ++
 winsup/cygwin/sigproc.cc | 16 +++-
 2 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index cd4de37..36c4dec 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,11 @@
 2015-11-02  Corinna Vinschen  
 
+   * sigproc.cc (class pending_signals): Drop sigproc_init friendship.
+   (pending_signals::clear): Fix implementation to avoid subsequent
+   endless loop in wait_sig.  Improve comment.
+
+2015-11-02  Corinna Vinschen  
+
* mount.h (enum fs_info_type): Add prlfs (Parallels Desktop FS).
(class fs_info): Add has_broken_fnoi flag.  Implement prlfs FS flag.
* mount.cc (fs_info::update): Handle PrlFS.  Fill new has_broken_fnoi
diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc
index 387a71a..fbc738d 100644
--- a/winsup/cygwin/sigproc.cc
+++ b/winsup/cygwin/sigproc.cc
@@ -82,7 +82,6 @@ public:
   void clear (_cygtls *tls);
   friend void __reg1 sig_dispatch_pending (bool);
   friend void WINAPI wait_sig (VOID *arg);
-  friend void sigproc_init ();
 };
 
 Static pending_signals sigq;
@@ -398,14 +397,21 @@ sig_clear (int sig)
   sigq.clear (sig);
 }
 
-/* Clear pending signals of specific thread.  Called from
+/* Clear pending signals of specific thread.  Called under TLS lock from
_cygtls::remove_pending_sigs. */
 void
 pending_signals::clear (_cygtls *tls)
 {
-  for (int sig = 0; sig < NSIG + 1; ++sig)
-if (sigs[sig].sigtls == tls)
-  clear (sig);
+  sigpacket *q = , *qnext;
+
+  while ((qnext = q->next))
+{
+  if (qnext->sigtls == tls)
+   {
+ q->next = qnext->next;
+ qnext->si.si_signo = 0;
+   }
+}
 }
 
 /* Clear pending signals of specific thread.  Called from _cygtls::remove */


[newlib-cygwin/cygwin-acl] Check for correct funtion entry address in munge_threadfunc

2015-11-02 Thread Corinna Vinschen
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=8aeda4365518c8e35813079bd3797f89e6a50ff7

commit 8aeda4365518c8e35813079bd3797f89e6a50ff7
Author: Qian Hong 
Date:   Thu Oct 29 09:17:46 2015 +0100

Check for correct funtion entry address in munge_threadfunc

* init.cc (munge_threadfunc): Check that we're actually replacing
the correct original function address on the stack.
* ntdll.h (enum _THREADINFOCLASS): Add ThreadQuerySetWin32StartAddress.

Signed-off-by: Corinna Vinschen 

Diff:
---
 winsup/cygwin/ChangeLog | 6 ++
 winsup/cygwin/init.cc   | 9 +++--
 winsup/cygwin/ntdll.h   | 3 ++-
 winsup/cygwin/release/2.3.0 | 3 +++
 4 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 0be6410..ef55389 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,9 @@
+2015-10-29  Qian Hong  
+
+   * init.cc (munge_threadfunc): Check that we're actually replacing
+   the correct original function address on the stack.
+   * ntdll.h (enum _THREADINFOCLASS): Add ThreadQuerySetWin32StartAddress.
+
 2015-08-21  Jon Turney  
 
* cygwin-cxx.h: Remove execute permissions.
diff --git a/winsup/cygwin/init.cc b/winsup/cygwin/init.cc
index 56d4668..69e66a0 100644
--- a/winsup/cygwin/init.cc
+++ b/winsup/cygwin/init.cc
@@ -55,12 +55,17 @@ munge_threadfunc ()
 
   if (threadfunc_ix[0])
 {
-  char *threadfunc = ebp[threadfunc_ix[0]];
+  char *threadfunc = NULL;
+
+  NtQueryInformationThread (NtCurrentThread (),
+   ThreadQuerySetWin32StartAddress,
+   , sizeof threadfunc, NULL);
   if (!search_for || threadfunc == search_for)
{
  search_for = NULL;
  for (i = 0; threadfunc_ix[i]; i++)
-   ebp[threadfunc_ix[i]] = (char *) threadfunc_fe;
+   if (!threadfunc || ebp[threadfunc_ix[i]] == threadfunc)
+  ebp[threadfunc_ix[i]] = (char *) threadfunc_fe;
  TlsSetValue (_my_oldfunc, threadfunc);
}
 }
diff --git a/winsup/cygwin/ntdll.h b/winsup/cygwin/ntdll.h
index 13a131d..050e848 100644
--- a/winsup/cygwin/ntdll.h
+++ b/winsup/cygwin/ntdll.h
@@ -1162,7 +1162,8 @@ typedef enum _THREADINFOCLASS
 {
   ThreadBasicInformation = 0,
   ThreadTimes = 1,
-  ThreadImpersonationToken = 5
+  ThreadImpersonationToken = 5,
+  ThreadQuerySetWin32StartAddress = 9
 } THREADINFOCLASS, *PTHREADINFOCLASS;
 
 /* Checked on 64 bit. */
diff --git a/winsup/cygwin/release/2.3.0 b/winsup/cygwin/release/2.3.0
index b517abd..5eb0605 100644
--- a/winsup/cygwin/release/2.3.0
+++ b/winsup/cygwin/release/2.3.0
@@ -53,3 +53,6 @@ Bug Fixes
 
 - Avoid SEGV when handling SIDs with 0 subauthorities.
   Addresses: https://cygwin.com/ml/cygwin/2015-10/msg00141.html
+
+- Fix a potential SEGV on (at least) Wine.
+  Addresses: https://cygwin.com/ml/cygwin/2015-10/msg00018.html


[newlib-cygwin/cygwin-acl] Fix sigwait and pthread_kill return values in case of error

2015-11-02 Thread Corinna Vinschen
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=d7a156418fbca7c6bc84061dd7d9f460bcd95eaa

commit d7a156418fbca7c6bc84061dd7d9f460bcd95eaa
Author: Corinna Vinschen 
Date:   Fri Oct 30 16:05:43 2015 +0100

Fix sigwait and pthread_kill return values in case of error

* signal.cc (sigwait): Fix return value to reflect errno in case of
error according to POSIX.  Never return EINTR.
* thread.cc (pthread_kill): Return errno if sig_send failed.

Signed-off-by: Corinna Vinschen 

Diff:
---
 winsup/cygwin/ChangeLog |  6 ++
 winsup/cygwin/release/2.3.0 |  4 
 winsup/cygwin/signal.cc | 10 --
 winsup/cygwin/thread.cc |  6 +-
 4 files changed, 23 insertions(+), 3 deletions(-)

diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index ef55389..b4b0f69 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,9 @@
+2015-10-30  Corinna Vinschen  
+
+   * signal.cc (sigwait): Fix return value to reflect errno in case of
+   error according to POSIX.  Never return EINTR.
+   * thread.cc (pthread_kill): Return errno if sig_send failed.
+
 2015-10-29  Qian Hong  
 
* init.cc (munge_threadfunc): Check that we're actually replacing
diff --git a/winsup/cygwin/release/2.3.0 b/winsup/cygwin/release/2.3.0
index 5eb0605..123a0c7 100644
--- a/winsup/cygwin/release/2.3.0
+++ b/winsup/cygwin/release/2.3.0
@@ -56,3 +56,7 @@ Bug Fixes
 
 - Fix a potential SEGV on (at least) Wine.
   Addresses: https://cygwin.com/ml/cygwin/2015-10/msg00018.html
+
+- Fix sigwait(3) to return errno instead of -1 and never to return with EINTR.
+
+- Fix pthread_kill(3) to return errno instead of -1.
diff --git a/winsup/cygwin/signal.cc b/winsup/cygwin/signal.cc
index 4897417..8dfd4ab 100644
--- a/winsup/cygwin/signal.cc
+++ b/winsup/cygwin/signal.cc
@@ -557,10 +557,16 @@ siginterrupt (int sig, int flag)
 extern "C" int
 sigwait (const sigset_t *set, int *sig_ptr)
 {
-  int sig = sigwaitinfo (set, NULL);
+  int sig;
+
+  do
+{
+  sig = sigwaitinfo (set, NULL);
+}
+  while (sig == -1 && get_errno () == EINTR);
   if (sig > 0)
 *sig_ptr = sig;
-  return sig > 0 ? 0 : -1;
+  return sig > 0 ? 0 : get_errno ();
 }
 
 extern "C" int
diff --git a/winsup/cygwin/thread.cc b/winsup/cygwin/thread.cc
index d9b6211..ff84590 100644
--- a/winsup/cygwin/thread.cc
+++ b/winsup/cygwin/thread.cc
@@ -3056,7 +3056,11 @@ pthread_kill (pthread_t thread, int sig)
   if (!thread->valid)
 rval = ESRCH;
   else if (sig)
-rval = sig_send (NULL, si, thread->cygtls);
+{
+  rval = sig_send (NULL, si, thread->cygtls);
+  if (rval == -1)
+   rval = get_errno ();
+}
   else
 switch (WaitForSingleObject (thread->win32_obj_id, 0))
   {


Re: compile ncurses "hello world" to run independent of cygwin?

2015-11-02 Thread Darik Horn
On Mon, Nov 2, 2015 at 10:14 AM, Greg Freemyer  wrote:
>
> The last time I checked (a few years ago), my understanding was the
> cygwin dll's were licensed such that any programs using them had to be
> GPL (or equivalent).
>
> Is that wrong?

No, that is still the case:

* https://cygwin.com/licensing.html


> If so, anyone wanting to write a commercial tool has to avoid the
> cygwin's core dll's.

Or buy a license.


> Does using mingw do so?

No, it is easier to avoid GPL obligations by using the MinGW runtime:

* http://www.mingw.org/license

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



[newlib-cygwin/cygwin-acl] Workaround bug in LocaleNameToLCID on Windows 10

2015-11-02 Thread Corinna Vinschen
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=018ab22dfdf64b40027f1f9cbb65088fe3cddafb

commit 018ab22dfdf64b40027f1f9cbb65088fe3cddafb
Author: Corinna Vinschen 
Date:   Fri Oct 30 20:13:26 2015 +0100

Workaround bug in LocaleNameToLCID on Windows 10

* nlsfuncs.cc (__get_lcid_from_locale): Handle LocaleNameToLCID
returning LOCALE_CUSTOM_UNSPECIFIED instead of failing in case of
an unsupported locale on Windows 10.

Signed-off-by: Corinna Vinschen 

Diff:
---
 winsup/cygwin/ChangeLog |  6 ++
 winsup/cygwin/nlsfuncs.cc   | 19 +--
 winsup/cygwin/release/2.3.0 |  3 +++
 3 files changed, 22 insertions(+), 6 deletions(-)

diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 255d795..ba11e0c 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,11 @@
 2015-10-30  Corinna Vinschen  
 
+   * nlsfuncs.cc (__get_lcid_from_locale): Handle LocaleNameToLCID
+   returning LOCALE_CUSTOM_UNSPECIFIED instead of failing in case of
+   an unsupported locale on Windows 10.
+
+2015-10-30  Corinna Vinschen  
+
* exceptions.cc (sigpacket::process): Avoid potentially double unlocking
the TLS mutex.
 
diff --git a/winsup/cygwin/nlsfuncs.cc b/winsup/cygwin/nlsfuncs.cc
index f7031f9..1b2b2d7 100644
--- a/winsup/cygwin/nlsfuncs.cc
+++ b/winsup/cygwin/nlsfuncs.cc
@@ -1,6 +1,6 @@
 /* nlsfuncs.cc: NLS helper functions
 
-   Copyright 2010, 2011, 2012, 2013 Red Hat, Inc.
+   Copyright 2010, 2011, 2012, 2013, 2015 Red Hat, Inc.
 
 This file is part of Cygwin.
 
@@ -88,7 +88,9 @@ __get_lcid_from_locale (const char *name)
   *c = '-';
   mbstowcs (wlocale, locale, ENCODING_LEN + 1);
   lcid = LocaleNameToLCID (wlocale, 0);
-  if (lcid == 0)
+  /* Bug on Windows 10: LocaleNameToLCID returns LOCALE_CUSTOM_UNSPECIFIED
+ for unknown locales. */
+  if (lcid == 0 || lcid == LOCALE_CUSTOM_UNSPECIFIED)
{
  /* Unfortunately there are a couple of locales for which no form
 without a Script part per RFC 4646 exists.
@@ -127,24 +129,29 @@ __get_lcid_from_locale (const char *name)
  {
/* Vista/2K8 is missing sr-ME and sr-RS.  It has only the
   deprecated sr-CS.  So we map ME and RS to CS here. */
-   if (lcid == 0)
+   if (lcid == 0 || lcid == LOCALE_CUSTOM_UNSPECIFIED)
  lcid = LocaleNameToLCID (L"sr-Cyrl-CS", 0);
/* "@latin" modifier for the sr_XY locales changes
collation behaviour so lcid should accommodate that
by being set to the Latin sublang. */
-   if (lcid != 0 && has_modifier ("@latin"))
+   if (lcid != 0 && lcid != LOCALE_CUSTOM_UNSPECIFIED
+   && has_modifier ("@latin"))
  lcid = MAKELANGID (lcid & 0x3ff, (lcid >> 10) - 1);
  }
else if (!strncmp (locale, "uz-", 3))
  {
/* Equivalent for "@cyrillic" modifier in uz_UZ locale */
-   if (lcid != 0 && has_modifier ("@cyrillic"))
+   if (lcid != 0 && lcid != LOCALE_CUSTOM_UNSPECIFIED
+   && has_modifier ("@cyrillic"))
  lcid = MAKELANGID (lcid & 0x3ff, (lcid >> 10) + 1);
  }
break;
  }
}
-  last_lcid = lcid ?: (LCID) -1;
+  if (lcid && lcid != LOCALE_CUSTOM_UNSPECIFIED)
+   last_lcid = lcid;
+  else
+   last_lcid = (LCID) -1;
   debug_printf ("LCID=%04y", last_lcid);
   return last_lcid;
 }
diff --git a/winsup/cygwin/release/2.3.0 b/winsup/cygwin/release/2.3.0
index 123a0c7..d58de2f 100644
--- a/winsup/cygwin/release/2.3.0
+++ b/winsup/cygwin/release/2.3.0
@@ -60,3 +60,6 @@ Bug Fixes
 - Fix sigwait(3) to return errno instead of -1 and never to return with EINTR.
 
 - Fix pthread_kill(3) to return errno instead of -1.
+
+- Workaround a bug in Windows 10 NLS handling.
+  Addresses: https://cygwin.com/ml/cygwin/2015-10/msg00547.html


[newlib-cygwin] Define MAX_IPOPTLEN

2015-11-02 Thread Corinna Vinschen
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=7321662bb0db3bb14e9f0214a663cf013330c248

commit 7321662bb0db3bb14e9f0214a663cf013330c248
Author: Corinna Vinschen 
Date:   Mon Nov 2 15:42:30 2015 +0100

Define MAX_IPOPTLEN

* include/netinet/ip.h (MAX_IPOPTLEN): Define.

Signed-off-by: Corinna Vinschen 

Diff:
---
 winsup/cygwin/ChangeLog| 4 
 winsup/cygwin/include/netinet/ip.h | 2 ++
 2 files changed, 6 insertions(+)

diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 179eb24..dfeaf39 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,9 @@
 2015-11-02  Corinna Vinschen  
 
+   * include/netinet/ip.h (MAX_IPOPTLEN): Define.
+
+2015-11-02  Corinna Vinschen  
+
* sigproc.cc (class pending_signals): Drop sigproc_init friendship.
(pending_signals::clear): Fix implementation to avoid subsequent
endless loop in wait_sig.  Improve comment.
diff --git a/winsup/cygwin/include/netinet/ip.h 
b/winsup/cygwin/include/netinet/ip.h
index dd70151..4d35542 100644
--- a/winsup/cygwin/include/netinet/ip.h
+++ b/winsup/cygwin/include/netinet/ip.h
@@ -202,6 +202,8 @@ struct ip {
 #define IPOPT_OFFSET   2   /* offset within option */
 #define IPOPT_MINOFF   4   /* min value of above */
 
+#define MAX_IPOPTLEN   40
+
 /*
  * Time stamp option structure.
  */


Re: compile ncurses "hello world" to run independent of cygwin?

2015-11-02 Thread Greg Freemyer
On Mon, Nov 2, 2015 at 7:48 AM, cyg Simple  wrote:
> On 11/1/2015 11:09 PM, Darik Horn wrote:
>>
>> Unless there is a specific reason to cross through Cygwin, it could be
>> easier to use the native MinGW environment directly:
>>
>> * http://www.mingw.org/wiki/Getting_Started
>>
>
> Poppycock! There is no reason that the user couldn't use Cygwin as the
> one and only system to build native binaries.

I'm relatively new to this mailing list.  Apologies if this is well
covered ground

The last time I checked (a few years ago), my understanding was the
cygwin dll's were licensed such that any programs using them had to be
GPL (or equivalent).

Is that wrong?

If so, anyone wanting to write a commercial tool has to avoid the
cygwin's core dll's.

Does using mingw do so?

Thanks
Greg

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



[newlib-cygwin/cygwin-acl] Define MAX_IPOPTLEN

2015-11-02 Thread Corinna Vinschen
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=8631a3bb8d6d48e05e06db6c936fc6142c4945cf

commit 8631a3bb8d6d48e05e06db6c936fc6142c4945cf
Author: Corinna Vinschen 
Date:   Mon Nov 2 15:42:30 2015 +0100

Define MAX_IPOPTLEN

* include/netinet/ip.h (MAX_IPOPTLEN): Define.

Signed-off-by: Corinna Vinschen 

Diff:
---
 winsup/cygwin/ChangeLog| 4 
 winsup/cygwin/include/netinet/ip.h | 2 ++
 2 files changed, 6 insertions(+)

diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 36c4dec..e7dc642 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,9 @@
 2015-11-02  Corinna Vinschen  
 
+   * include/netinet/ip.h (MAX_IPOPTLEN): Define.
+
+2015-11-02  Corinna Vinschen  
+
* sigproc.cc (class pending_signals): Drop sigproc_init friendship.
(pending_signals::clear): Fix implementation to avoid subsequent
endless loop in wait_sig.  Improve comment.
diff --git a/winsup/cygwin/include/netinet/ip.h 
b/winsup/cygwin/include/netinet/ip.h
index dd70151..4d35542 100644
--- a/winsup/cygwin/include/netinet/ip.h
+++ b/winsup/cygwin/include/netinet/ip.h
@@ -202,6 +202,8 @@ struct ip {
 #define IPOPT_OFFSET   2   /* offset within option */
 #define IPOPT_MINOFF   4   /* min value of above */
 
+#define MAX_IPOPTLEN   40
+
 /*
  * Time stamp option structure.
  */


Re: [ITP] Inetutils 1.9.4

2015-11-02 Thread Corinna Vinschen
On Nov  2 10:57, Corinna Vinschen wrote:
> {Forgot to CC Gernot, sorry]
> 
> On Nov  2 10:56, Corinna Vinschen wrote:
> > On Nov  2 08:02, D. Boland wrote:
> > > Marco Atzeri wrote:
> > > >On 01/11/2015 15:19, D. Boland wrote:
> > > >>Marco Atzeri wrote:
> > > >>Arghh! I also forgot I had to install (copy) some missing include files.
> > > >>Thanks for checking this.
> > > >>
> > > >>I got these from the glibc-2.21 source code:
> > 
> > Please use BSD files, not glibc, for licensing reasons.
> > 
> > > >>/usr/include/arpa/tftp.h
> > > >
> > > >tftp has this
> > > >https://cygwin.com/packages/x86_64/tftp/tftp-5.2-1
> > > >
> > > >>/usr/include/netinet/icmp6.h
> > > >
> > > >not yet included
> > > >https://cygwin.com/cgi-bin2/package-grep.cgi?grep=icmp6.h=x86_64
> > > >
> > > >>
> > > >>The MAX_IPOPTLEN constant is in ip_var.h. I got that from OpenBSD 
> > > >>source:

I applied ther matching patch to the Cygwin repository.


HTH,
Corinna

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


pgpFJfdgHb5wj.pgp
Description: PGP signature


Re: compile ncurses "hello world" to run independent of cygwin?

2015-11-02 Thread Corinna Vinschen
On Nov  2 10:14, Greg Freemyer wrote:
> On Mon, Nov 2, 2015 at 7:48 AM, cyg Simple  wrote:
> > On 11/1/2015 11:09 PM, Darik Horn wrote:
> >>
> >> Unless there is a specific reason to cross through Cygwin, it could be
> >> easier to use the native MinGW environment directly:
> >>
> >> * http://www.mingw.org/wiki/Getting_Started
> >>
> >
> > Poppycock! There is no reason that the user couldn't use Cygwin as the
> > one and only system to build native binaries.
> 
> I'm relatively new to this mailing list.  Apologies if this is well
> covered ground
> 
> The last time I checked (a few years ago), my understanding was the
> cygwin dll's were licensed such that any programs using them had to be
> GPL (or equivalent).

Yes, when linking against the Cygwin DLL there are GPL issues.

But that wasn't what "cyg Simple" was referring to.  The Cygwin distro
comes with a Mingw-w64 cross compiler and libs.  When you use those to
create Mingw binaries, you are not linking against the Cygwin DLL.

So, as "cyg Simple" wrote, there's no reason that you can't use the
Cygwin distro as environment to build non-Cygwin binaries.

There's also the fact that the aforementioned mingw.org project is
rather behind.  The Mingw-w64 fork (which is used by Cygwin as well,
incidentally) is more up to speed in terms of WIndows lib and header
file support.


Corinna

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


pgpinEZzGRqRZ.pgp
Description: PGP signature


Re: Mounting a network share

2015-11-02 Thread Corinna Vinschen
On Nov  1 23:35, Mike Brown wrote:
> On Mon, Nov 02, 2015 at 04:40:33AM +0300, Andrey Repin wrote:
> > net use //host/resource[/path] P: * /PERSISTENT /SAVECRED
> 
> I got the following to be accepted:
> 
> net use \\192.168.1.40\Public password /user:brown /persistant:yes
> 
> The syntax doesn't have a place to where it should be mounted.

I missed that in my reply.  It has:

  net use X: \\server\share

when using this command in a Cygwin shell, keep in mind that backslashes
need to be escaped in Unix shells:

  net use X: server\\share


Corinna

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


pgpQZW5i4A7v4.pgp
Description: PGP signature


[newlib-cygwin] Fix incorrect implementation to clear per-thread pending signals

2015-11-02 Thread Corinna Vinschen
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=90b9303f0b43de0568606677cda779e781464a00

commit 90b9303f0b43de0568606677cda779e781464a00
Author: Corinna Vinschen 
Date:   Mon Nov 2 13:53:25 2015 +0100

Fix incorrect implementation to clear per-thread pending signals

* sigproc.cc (class pending_signals): Drop sigproc_init friendship.
(pending_signals::clear): Fix implementation to avoid subsequent
endless loop in wait_sig.  Improve comment.

Signed-off-by: Corinna Vinschen 

Diff:
---
 winsup/cygwin/ChangeLog  |  6 ++
 winsup/cygwin/sigproc.cc | 16 +++-
 2 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 9dfa1b3..179eb24 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,11 @@
 2015-11-02  Corinna Vinschen  
 
+   * sigproc.cc (class pending_signals): Drop sigproc_init friendship.
+   (pending_signals::clear): Fix implementation to avoid subsequent
+   endless loop in wait_sig.  Improve comment.
+
+2015-11-02  Corinna Vinschen  
+
* mount.h (enum fs_info_type): Add prlfs (Parallels Desktop FS).
(class fs_info): Add has_broken_fnoi flag.  Implement prlfs FS flag.
* mount.cc (fs_info::update): Handle PrlFS.  Fill new has_broken_fnoi
diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc
index 387a71a..fbc738d 100644
--- a/winsup/cygwin/sigproc.cc
+++ b/winsup/cygwin/sigproc.cc
@@ -82,7 +82,6 @@ public:
   void clear (_cygtls *tls);
   friend void __reg1 sig_dispatch_pending (bool);
   friend void WINAPI wait_sig (VOID *arg);
-  friend void sigproc_init ();
 };
 
 Static pending_signals sigq;
@@ -398,14 +397,21 @@ sig_clear (int sig)
   sigq.clear (sig);
 }
 
-/* Clear pending signals of specific thread.  Called from
+/* Clear pending signals of specific thread.  Called under TLS lock from
_cygtls::remove_pending_sigs. */
 void
 pending_signals::clear (_cygtls *tls)
 {
-  for (int sig = 0; sig < NSIG + 1; ++sig)
-if (sigs[sig].sigtls == tls)
-  clear (sig);
+  sigpacket *q = , *qnext;
+
+  while ((qnext = q->next))
+{
+  if (qnext->sigtls == tls)
+   {
+ q->next = qnext->next;
+ qnext->si.si_signo = 0;
+   }
+}
 }
 
 /* Clear pending signals of specific thread.  Called from _cygtls::remove */


Re: fstat st_size on open files on Parallels filesystem is wrong

2015-11-02 Thread Jonathan Lennox
On Monday, November 2 2015, "Corinna Vinschen" wrote to "cygwin@cygwin.com" 
saying:

> On Nov  2 04:38, Jonathan Lennox wrote:
> > Unfortunately, when I do "Run As Administrator" on MinTTY, the Mac drives
> > (/cygdrive/z and /cygdrive/y) don't show up. I don't know why that is.  So I
> > can't test hard links as administrator.
> 
> That's a security feature of UAC.  You can change that in the registry.
> As administrator:
> 
>   regtool -d set 
> /HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Policies/System/EnableLinkedConnections
>  1
> 
> Then reboot.

Didn't work:

$ ls /cygdrive/
c  d  e

$ regtool get 
/HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Policies/System/EnableLinkedConnections

$ uname -a
CYGWIN_NT-10.0 Vidyo-LT0519-10 2.3.0(0.291/5/3) 2015-11-02 11:15 x86_64 Cygwin

Is Windows 10 the same?

> I added support for this filesystem (called prlfs in mount output) and
> without hardlink support for now.  I uploaded a new developer snapshot
> to https://cygwin.com/snapshots/ Please give it a try.

No, still seeing the failure in the snapshot:

$ ./stat-size-test.exe /cygdrive/y/foo ~/foo
/cygdrive/y/foo: fstat: st_size=0
/cygdrive/y/foo: stat: st_size=12
/home/jonathan/foo: fstat: st_size=12
/home/jonathan/foo: stat: st_size=12

$ uname -a
CYGWIN_NT-10.0 Vidyo-LT0519-10 2.3.0(0.291/5/3) 2015-11-02 11:15 x86_64 Cygwin

(See https://cygwin.com/ml/cygwin/2014-04/msg00488.html for the source code
to stat-size-test.c).

Oddly, though, the original problematic behavior I saw in emacs (with it
falsely detecting files as being modified externally) has gone away. Maybe
emacs added a workaround for this?

-- 
Jonathan Lennox
len...@cs.columbia.edu

--
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: pthread_kill: signals remain pending after target thread exits

2015-11-02 Thread Corinna Vinschen
On Nov  2 15:18, Corinna Vinschen wrote:
> On Oct 29 16:16, John Carey wrote:
> > > From: Corinna Vinschen [corinna-cyg...@cygwin.com]
> > > Sent: Thursday, October 29, 2015 1:02 AM
> > > On Oct 28 10:14, Corinna Vinschen wrote:
> > ...
> > > > > Thanks; that was fast!  I tried replacing cygwin1.dll with 
> > > > > cygwin1-20151023.dll .
> > > > >
> > > > > The original test case now works.  I checked some of my other tests,
> > > > > and unfortunately some of them failed, so I extracted out a new test
> > > > > case, which is attached.  My guess is that something is subtly 
> > > > > different
> > > > > about the timing on this test.
> > > >
> > > > Is this a regression?  Did it work with 2.2.1?
> > > 
> > > Answering myself here, this didn't work at all in 2.2.1.  I can
> > > reproduce the problem and I'm going to take a look.  Not sure if
> > > there's a quick solution, though.  This looks like a deadlock
> > > situation.  The signal definitely got send, I just don't see yet
> > > why it's not handled in wait_sig.
> > 
> > Yes, test_pending_signal2.c fails in 2.2.1, though the symptoms
> > differ: there is no Cygwin process left hanging that cannot be
> > killed by a Cygwin signal.
> > 
> > But both tests appear to pass in Cygwin 1.7.9, so in that sense
> > it is a regression, just not a recent one.
> 
> The regression here was my original fix.  It didn't clear pending
> signals for an exiting thread thorougly enough.  I applied a patch now
> which should fix this issue.  I'll upload a new developer snapshot to
> https://cygwin.com/snapshots/ later today or tomorrow (still looking
> into the PrlFS issue).  Please give it a try.

Snapshot is up.  The fix is in the 2.3.0-0.5 test release as well.
Please give any one of them a try.


Thanks,
Corinna

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


pgpSoNV2xJUHR.pgp
Description: PGP signature


Re: Mounting a network share

2015-11-02 Thread Mike Brown
On Mon, Nov 02, 2015 at 05:26:51PM +0100, Corinna Vinschen wrote:
> On Nov  2 10:03, Mike Brown wrote:
> > On Mon, Nov 02, 2015 at 04:40:33AM +0300, Andrey Repin wrote:
> > > If you want to do it from Cygwin side, use fstab and don't use /cygdrive
> > > prefix. It is for automatic mounts ONLY.
> > 
> > I went and found the Cygwin web page that describes fstab.  What it doesn't
> > say is how to use it.
> 
> It does: https://cygwin.com/cygwin-ug-net/using.html#mount-table

What I mean is that I was able to create an entry, but I have no idea how to
get the mount program to read the contents.

> > I have the following entry:
> > 
> > 192.168.1.40:/Public /Public nfs noacl 0 0
>   
> 
> This syntax isn't known in Windows.  Use the same syntax as with SMB
> shares, just use forward slashes:
> 
>   //192.168.1.40/Public /Public foo binary 0 0
> 
> "noacl" has no meaning on NFS shares, btw. 

No there no explantion on how to enter a user and password.  I tried the nfs
syntax because it doesn't require a password.

MB
-- 
e-mail: vid...@vidiot.com | vid...@vidiot.net/~\ The ASCII
6082066...@email.uscc.net (140 char limit)   \ / Ribbon Campaign
Visit - URL: http://vidiot.com/   X  Against
 http://vidiot.net/  / \ HTML Email
"What do you say Beckett. Wanna have a baby?" - Castle to Det. Beckett
"How long have I been gone?" Alexis after seeing Castle and Beckett w/ baby
 - Castle - 11/25/13

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



gnome-commander 1.4.7-1

2015-11-02 Thread Yaakov Selkowitz
The following packages have been uploaded to the Cygwin distribution:

* gnome-commander-1.4.7-1

GNOME Commander is a two-pane graphical filemanager for the GNOME 
desktop environment. GNOME Commander aims to fulfill the demands of more 
advanced users who like to focus on file management, their work through 
special applications and running smart commands.


[ANNOUNCEMENT] gnome-commander 1.4.7-1

2015-11-02 Thread Yaakov Selkowitz
The following packages have been uploaded to the Cygwin distribution:

* gnome-commander-1.4.7-1

GNOME Commander is a two-pane graphical filemanager for the GNOME 
desktop environment. GNOME Commander aims to fulfill the demands of more 
advanced users who like to focus on file management, their work through 
special applications and running smart commands.

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



gthumb 3.2.9.1-2

2015-11-02 Thread Yaakov Selkowitz
The following packages have been uploaded to the Cygwin distribution:

* gthumb-3.2.9.1-2
* gthumb-devel-3.2.9.1-2

gThumb is a powerful image browser, viewer, organizer, and editor for 
the GNOME Desktop.


[ANNOUNCEMENT] gthumb 3.2.9.1-2

2015-11-02 Thread Yaakov Selkowitz
The following packages have been uploaded to the Cygwin distribution:

* gthumb-3.2.9.1-2
* gthumb-devel-3.2.9.1-2

gThumb is a powerful image browser, viewer, organizer, and editor for 
the GNOME Desktop.

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



python-pygments, python3-pygments 2.0.2-1

2015-11-02 Thread Yaakov Selkowitz
The following packages have been uploaded to the Cygwin distribution:

* python-pygments-2.0.2-1
* python3-pygments-2.0.2-1

Pygments is a syntax highlighting package written in Python. It is a 
generic syntax highlighter for general use in all kinds of software such 
as forum systems, wikis or other applications that need to prettify 
source code.

This is an update to the latest upstream release, with a patch for a 
shell injection vulnerability:

https://bugzilla.redhat.com/show_bug.cgi?id=1276321


[ANNOUNCEMENT] python-pygments, python3-pygments 2.0.2-1

2015-11-02 Thread Yaakov Selkowitz
The following packages have been uploaded to the Cygwin distribution:

* python-pygments-2.0.2-1
* python3-pygments-2.0.2-1

Pygments is a syntax highlighting package written in Python. It is a 
generic syntax highlighter for general use in all kinds of software such 
as forum systems, wikis or other applications that need to prettify 
source code.

This is an update to the latest upstream release, with a patch for a 
shell injection vulnerability:

https://bugzilla.redhat.com/show_bug.cgi?id=1276321

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



mesa 11.0.4-1

2015-11-02 Thread Yaakov Selkowitz
The following packages have been uploaded to the Cygwin distribution:

* mesa-11.0.4-1
* dri-drivers-11.0.4-1
* libglapi0-11.0.4-1
* libGL1-11.0.4-1
* libGL-devel-11.0.4-1
* libOSMesa8-11.0.4-1
* libOSMesa-devel-11.0.4-1
* libEGL1-11.0.4-1
* libEGL-devel-11.0.4-1
* libGLESv2_2-11.0.4-1
* libGLESv2-devel-11.0.4-1
* windowsdriproto-11.0.4-1

Mesa is an open-source implementation of the OpenGL specification,
a system for rendering interactive 3D graphics.

Complete documentation on OpenGL usage and configuration can be found here:

http://x.cygwin.com/docs/ug/using-glx.html

This is an update to the latest upstream bugfix release:

http://mesa3d.org/relnotes/11.0.4.html

--
Yaakov


[ANNOUNCEMENT] gmic 1.6.7-1

2015-11-02 Thread Yaakov Selkowitz
The following packages have been uploaded to the Cygwin distribution:

* gmic-1.6.7-1
* gmic-zart-1.6.7-1
* gimp-gmic-1.6.7-1
* libgmic1-1.6.7-1
* libgmic-devel-1.6.7-1

G'MIC is focused on the design of complex pipelines for converting, 
manipulating, filtering and visualizing generic 1d/2d/3d multi-spectral 
image datasets. Of course, it is able to manage color images, but also 
more complex data as image sequences or 3d volumetric datasets.

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



gmic 1.6.7-1

2015-11-02 Thread Yaakov Selkowitz
The following packages have been uploaded to the Cygwin distribution:

* gmic-1.6.7-1
* gmic-zart-1.6.7-1
* gimp-gmic-1.6.7-1
* libgmic1-1.6.7-1
* libgmic-devel-1.6.7-1

G'MIC is focused on the design of complex pipelines for converting, 
manipulating, filtering and visualizing generic 1d/2d/3d multi-spectral 
image datasets. Of course, it is able to manage color images, but also 
more complex data as image sequences or 3d volumetric datasets.

--
Yaakov


[ANNOUNCEMENT] mesa 11.0.4-1

2015-11-02 Thread Yaakov Selkowitz
The following packages have been uploaded to the Cygwin distribution:

* mesa-11.0.4-1
* dri-drivers-11.0.4-1
* libglapi0-11.0.4-1
* libGL1-11.0.4-1
* libGL-devel-11.0.4-1
* libOSMesa8-11.0.4-1
* libOSMesa-devel-11.0.4-1
* libEGL1-11.0.4-1
* libEGL-devel-11.0.4-1
* libGLESv2_2-11.0.4-1
* libGLESv2-devel-11.0.4-1
* windowsdriproto-11.0.4-1

Mesa is an open-source implementation of the OpenGL specification,
a system for rendering interactive 3D graphics.

Complete documentation on OpenGL usage and configuration can be found here:

http://x.cygwin.com/docs/ug/using-glx.html

This is an update to the latest upstream bugfix release:

http://mesa3d.org/relnotes/11.0.4.html

--
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: Using cp converts windows junctions to a cywin symlink

2015-11-02 Thread Andrey Repin
Greetings, Adrian H!

> I was copying a directory of files, some of which were windows junctions.
> These got converted to a cygwin symlink.  Although I am impressed that there
> are such a thing for those OSs/drives that do not support such things, for 
> those
> that do, I think it would be good to keep the copy a junction.  Otherwise,
> things can get messy.

> Can this be corrected?

Unfortunately, even on systems, that do support symlinks functionality, it is
restricted by UAC and not easily unlocked.
You'd need an admin shell or a user profile with UAC turned off and permissions
correctly configured to exploit native symlinks.
And Cygwin does not support creation of directory junctions to the best of my
knowledge. :(


-- 
With best regards,
Andrey Repin
Monday, November 2, 2015 22:48:43

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



Using cp converts windows junctions to a cywin symlink

2015-11-02 Thread Adrian H
I was copying a directory of files, some of which were windows junctions.
These got converted to a cygwin symlink.  Although I am impressed that there
are such a thing for those OSs/drives that do not support such things, for those
that do, I think it would be good to keep the copy a junction.  Otherwise,
things can get messy.

Can this be corrected?

Thanks,


A

--
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: Mounting a network share

2015-11-02 Thread Andrey Repin
Greetings, Mike Brown!

>> > > If you want to do it from Cygwin side, use fstab and don't use /cygdrive
>> > > prefix. It is for automatic mounts ONLY.
>> > 
>> > I went and found the Cygwin web page that describes fstab.  What it doesn't
>> > say is how to use it.
>> 
>> It does: https://cygwin.com/cygwin-ug-net/using.html#mount-table

> What I mean is that I was able to create an entry, but I have no idea how to
> get the mount program to read the contents.

Cygwin's fstab only accepts 'bind mounts' (in *NIX terms). The article Corinna
mentioned clearly explains that.
Another difference from *NIX is that it is read and interpreted by Cygwin core
(cygwin1.dll) when a new process tree starts.

>> > I have the following entry:
>> > 
>> > 192.168.1.40:/Public /Public nfs noacl 0 0
>>   
>> 
>> This syntax isn't known in Windows.  Use the same syntax as with SMB
>> shares, just use forward slashes:
>> 
>>   //192.168.1.40/Public /Public foo binary 0 0
>> 
>> "noacl" has no meaning on NFS shares, btw. 

> No there no explantion on how to enter a user and password.

Because there's no such place. The resource must be available to the user.

Before we continue this discussion, I suggest to re-read the two paragraphs on
the cygwin.com main page. What Cygwin is and it is not.

You expect kernel OS functionality from a userland application. That's not how
Cygwin works. Cygwin leverages the operating system functionality to create a
level field for porting applications to Windows.

And to your 'net use' issues, 'net help use' should have been your first stop.
Yes, you can just call 'net use ' without specifying the name to
simply authenticate yourself with the resource.
Mind you, specifying a password in command line is always a bad idea. You
never know, where that password would be stored or displayed in between
terminal and the called application.


-- 
With best regards,
Andrey Repin
Monday, November 2, 2015 22:33:09

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: Unison 2.43.3 fails to synchronize execute permission bit

2015-11-02 Thread Ms. Alex Hankins
There was a bug with the umask in the test script.  I have fixed it
and attached it.

On Thu, Oct 29, 2015 at 11:26 AM, L <***> wrote:
> On Wed, Oct 28, 2015 at 2:55 PM,   wrote:
>> When synchronizing two directories on the same NTFS-formatted drive, unison 
>> (with -perms 0o1777) fails to set execute permissions on new files.  (It 
>> also fails to detect changes in execute permissions and to set them on 
>> existing files.)
>>...
>
> I forgot cygcheck.out.  I have attached it.
>
> Ms. Alex Hankins


test-whether-unison-preserves-execute-permissions.bash
Description: Binary data
--
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] krename 4.0.9-6

2015-11-02 Thread Yaakov Selkowitz
The following packages have been uploaded to the Cygwin distribution:

* krename-4.0.9-6

KRename is a powerful batch renamer for KDE. It allows you to easily 
rename hundreds or even more files in one go. The filenames can be 
created by parts of the original filename, numbering the files or 
accessing hundreds of informations about the file, like creation date or 
Exif informations of an image.

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



krename 4.0.9-6

2015-11-02 Thread Yaakov Selkowitz
The following packages have been uploaded to the Cygwin distribution:

* krename-4.0.9-6

KRename is a powerful batch renamer for KDE. It allows you to easily 
rename hundreds or even more files in one go. The filenames can be 
created by parts of the original filename, numbering the files or 
accessing hundreds of informations about the file, like creation date or 
Exif informations of an image.

--
Yaakov



Re: Mounting a network share

2015-11-02 Thread Corinna Vinschen
On Nov  2 10:03, Mike Brown wrote:
> On Mon, Nov 02, 2015 at 04:40:33AM +0300, Andrey Repin wrote:
> > If you want to do it from Cygwin side, use fstab and don't use /cygdrive
> > prefix. It is for automatic mounts ONLY.
> 
> I went and found the Cygwin web page that describes fstab.  What it doesn't
> say is how to use it.

It does: https://cygwin.com/cygwin-ug-net/using.html#mount-table

> I have the following entry:
> 
> 192.168.1.40:/Public /Public nfs noacl 0 0
  

This syntax isn't known in Windows.  Use the same syntax as with SMB
shares, just use forward slashes:

  //192.168.1.40/Public /Public foo binary 0 0

"noacl" has no meaning on NFS shares, btw. 


Corinna

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


pgplJvC6SG7i4.pgp
Description: PGP signature


[ANNOUNCEMENT] TEST RELEASE: Cygwin 2.3.0-0.5

2015-11-02 Thread Corinna Vinschen
Hi Cygwin friends and users,


I released a new TEST version of Cygwin, 2.3.0-0.5.

This test release adds all Cygwin-related patches applied after the 
2.3.0-0.4 test release.  The support for the Parallels Desktop FS
is apparently not working yet, but that might get fixed in the next
test release.

Other than that, the original intention, testing the "new POSIX ACL
handling reloaded" code, still applies.

This is the "new POSIX ACL handling reloaded" release.

In local testing I successfully integrated AuthZ into the current Cygwin
code to generate more correct user permissions by being able to generate
effective permissions for arbitrary users.

This success convinced me that it might be possible to pick up the POSIX
permission rewrite originally targeted for the 2.0.0 release and try to
update it using AuthZ and generally revamp it to reflect effective
permissions better.

My local testing looks good, but this is a major change, so this code
really needs a lot more testing in various scenarios.  Especially
some Windows ACLs created in corporate environments are often a hard
nut to crack, and the example from

https://cygwin.com/ml/cygwin/2015-04/msg00513.html

which was the ultimate downfall of the original implementation is
the stuff which needs some good testing.

There's, as usual, a downside: AuthZ leans a bit to the slow side.
Cygwin caches information already gathered once on a per-process basis,
but in locally crafted worst case scenarios (`ls' on lots of file owned
by lots of different users and groups) the slowdown may be up to 25%.
But that's really just a worst case, in the usual scenarios the slowdown
should be mostly unnoticable.

To alleviate the problem, the AuthZ code is fortunately only called for
non-Cygwin ACLs and Cygwin ACLs created before this release.  Within a
pure Cygwin environment (e.g., some build directory only used with
Cygwin tools) AuthZ should be practically unused.

Apart from the aforementioned code changes to "just do it right", there
are two additional changes I implemented for this new POSIX ACL revamp
release:

- I reverted the questionable change I added to 2.0.0-0.7 in terms of
  chmod group permission handling.  The original description of this
  change was:

If you have a non-trivial ACL with secondary accounts and thus a
mask value, chmod is supposed to change only the mask, not the
permissions of the primary group.  However, if the primary group has
few permissions to begin with, the result is really surprising.  ls
-l would, e.g., show read/write perms for the group, but the group
might still have only read perms.

Personally I find this chmod behaviour really, really bad, so I took
the liberty to change it in a way which gives a much less surprising
result:  If you call chmod on a non-trivial ACL, the group
permissions will be used for the primary group and the mask.

- setfacl(1) now accepts the combination of the -b and -k options, just as
  on Linux (here's looking at you Achim ;)).

As for the description what this implementation strives for, please see
http://linux.die.net/man/5/acl

All changes in this release so far:



What's new:
---

- strftime(3) supports %s (seconds since Epoch) now.

- posix_madvise(POSIX_MADV_WILLNEED) now utilizes OS functionality available
  starting with Windows 8/Server 2012.  Still a no-op on older systems.

- posix_madvise(POSIX_MADV_DONTNEED) now utilizes OS functionality available
  starting with Windows 8.1/Server 2012R2.  Still a no-op on older systems.

- sysconf() now supports returning CPU cache information:
  _SC_LEVEL1_ICACHE_SIZE, _SC_LEVEL1_ICACHE_ASSOC, _SC_LEVEL1_ICACHE_LINESIZE,
  _SC_LEVEL1_DCACHE_SIZE, _SC_LEVEL1_DCACHE_ASSOC, _SC_LEVEL1_DCACHE_LINESIZE,
  _SC_LEVEL2_CACHE_SIZE, _SC_LEVEL2_CACHE_ASSOC, _SC_LEVEL2_CACHE_LINESIZE,
  _SC_LEVEL3_CACHE_SIZE, _SC_LEVEL3_CACHE_ASSOC, _SC_LEVEL3_CACHE_LINESIZE,
  _SC_LEVEL4_CACHE_SIZE, _SC_LEVEL4_CACHE_ASSOC, _SC_LEVEL4_CACHE_LINESIZE

- New API: aligned_alloc, at_quick_exit, quick_exit.


What changed:
-

- setfacl(1) now allows to use the -b and -k option combined to allow reducing
  an ACL to only reflect standard POSIX permissions.

- Add support for Parallels Desktop FS (prlfs).


Bug Fixes
-

- Fix a hang when stracing a forking or spawning process without activating
  stracing of child processes.
  Addresses: https://cygwin.com/ml/cygwin/2015-08/msg00390.html

- Fix long-standing potential SEGV on 32 bit Cygwin when the dynamic loader
  for OS functions fails to load a function on Windows 7 or later.
  Addresses: No actual bug report known.

- sysconf _SC_NPROCESSORS_CONF and _SC_NPROCESSORS_ONLN now handle more than
  64 CPUs on Windows 7 and later.

- Fix a potential crash in advisory file locking due to usage of stack space
  out of scope.
  Addresses: https://cygwin.com/ml/cygwin/2015-09/msg00079.html

- Fix 

TEST RELEASE: Cygwin 2.3.0-0.5

2015-11-02 Thread Corinna Vinschen
Hi Cygwin friends and users,


I released a new TEST version of Cygwin, 2.3.0-0.5.

This test release adds all Cygwin-related patches applied after the 
2.3.0-0.4 test release.  The support for the Parallels Desktop FS
is apparently not working yet, but that might get fixed in the next
test release.

Other than that, the original intention, testing the "new POSIX ACL
handling reloaded" code, still applies.

This is the "new POSIX ACL handling reloaded" release.

In local testing I successfully integrated AuthZ into the current Cygwin
code to generate more correct user permissions by being able to generate
effective permissions for arbitrary users.

This success convinced me that it might be possible to pick up the POSIX
permission rewrite originally targeted for the 2.0.0 release and try to
update it using AuthZ and generally revamp it to reflect effective
permissions better.

My local testing looks good, but this is a major change, so this code
really needs a lot more testing in various scenarios.  Especially
some Windows ACLs created in corporate environments are often a hard
nut to crack, and the example from

https://cygwin.com/ml/cygwin/2015-04/msg00513.html

which was the ultimate downfall of the original implementation is
the stuff which needs some good testing.

There's, as usual, a downside: AuthZ leans a bit to the slow side.
Cygwin caches information already gathered once on a per-process basis,
but in locally crafted worst case scenarios (`ls' on lots of file owned
by lots of different users and groups) the slowdown may be up to 25%.
But that's really just a worst case, in the usual scenarios the slowdown
should be mostly unnoticable.

To alleviate the problem, the AuthZ code is fortunately only called for
non-Cygwin ACLs and Cygwin ACLs created before this release.  Within a
pure Cygwin environment (e.g., some build directory only used with
Cygwin tools) AuthZ should be practically unused.

Apart from the aforementioned code changes to "just do it right", there
are two additional changes I implemented for this new POSIX ACL revamp
release:

- I reverted the questionable change I added to 2.0.0-0.7 in terms of
  chmod group permission handling.  The original description of this
  change was:

If you have a non-trivial ACL with secondary accounts and thus a
mask value, chmod is supposed to change only the mask, not the
permissions of the primary group.  However, if the primary group has
few permissions to begin with, the result is really surprising.  ls
-l would, e.g., show read/write perms for the group, but the group
might still have only read perms.

Personally I find this chmod behaviour really, really bad, so I took
the liberty to change it in a way which gives a much less surprising
result:  If you call chmod on a non-trivial ACL, the group
permissions will be used for the primary group and the mask.

- setfacl(1) now accepts the combination of the -b and -k options, just as
  on Linux (here's looking at you Achim ;)).

As for the description what this implementation strives for, please see
http://linux.die.net/man/5/acl

All changes in this release so far:



What's new:
---

- strftime(3) supports %s (seconds since Epoch) now.

- posix_madvise(POSIX_MADV_WILLNEED) now utilizes OS functionality available
  starting with Windows 8/Server 2012.  Still a no-op on older systems.

- posix_madvise(POSIX_MADV_DONTNEED) now utilizes OS functionality available
  starting with Windows 8.1/Server 2012R2.  Still a no-op on older systems.

- sysconf() now supports returning CPU cache information:
  _SC_LEVEL1_ICACHE_SIZE, _SC_LEVEL1_ICACHE_ASSOC, _SC_LEVEL1_ICACHE_LINESIZE,
  _SC_LEVEL1_DCACHE_SIZE, _SC_LEVEL1_DCACHE_ASSOC, _SC_LEVEL1_DCACHE_LINESIZE,
  _SC_LEVEL2_CACHE_SIZE, _SC_LEVEL2_CACHE_ASSOC, _SC_LEVEL2_CACHE_LINESIZE,
  _SC_LEVEL3_CACHE_SIZE, _SC_LEVEL3_CACHE_ASSOC, _SC_LEVEL3_CACHE_LINESIZE,
  _SC_LEVEL4_CACHE_SIZE, _SC_LEVEL4_CACHE_ASSOC, _SC_LEVEL4_CACHE_LINESIZE

- New API: aligned_alloc, at_quick_exit, quick_exit.


What changed:
-

- setfacl(1) now allows to use the -b and -k option combined to allow reducing
  an ACL to only reflect standard POSIX permissions.

- Add support for Parallels Desktop FS (prlfs).


Bug Fixes
-

- Fix a hang when stracing a forking or spawning process without activating
  stracing of child processes.
  Addresses: https://cygwin.com/ml/cygwin/2015-08/msg00390.html

- Fix long-standing potential SEGV on 32 bit Cygwin when the dynamic loader
  for OS functions fails to load a function on Windows 7 or later.
  Addresses: No actual bug report known.

- sysconf _SC_NPROCESSORS_CONF and _SC_NPROCESSORS_ONLN now handle more than
  64 CPUs on Windows 7 and later.

- Fix a potential crash in advisory file locking due to usage of stack space
  out of scope.
  Addresses: https://cygwin.com/ml/cygwin/2015-09/msg00079.html

- Fix 

Re: Mounting a network share

2015-11-02 Thread Mike Brown
On Mon, Nov 02, 2015 at 04:40:33AM +0300, Andrey Repin wrote:
> If you want to do it from Cygwin side, use fstab and don't use /cygdrive
> prefix. It is for automatic mounts ONLY.

I went and found the Cygwin web page that describes fstab.  What it doesn't
say is how to use it.  I have the following entry:

192.168.1.40:/Public /Public nfs noacl 0 0

But, when I enter "mount /Public" mount complains about not enough options and
shows me the help for command line usage.  It doesn't appear to look in the
fstab file for the entry.

I did create /Public, so that path is there.

I tried it via the command line and it bitched about /Public.

I have no idea what I am doing wrong.

MB
-- 
e-mail: vid...@vidiot.com | vid...@vidiot.net/~\ The ASCII
6082066...@email.uscc.net (140 char limit)   \ / Ribbon Campaign
Visit - URL: http://vidiot.com/   X  Against
 http://vidiot.net/  / \ HTML Email
"What do you say Beckett. Wanna have a baby?" - Castle to Det. Beckett
"How long have I been gone?" Alexis after seeing Castle and Beckett w/ baby
 - Castle - 11/25/13

--
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: Mounting a network share

2015-11-02 Thread Roger Wells
On 11/02/2015 11:18 AM, Corinna Vinschen wrote:
> On Nov  1 23:35, Mike Brown wrote:
>> On Mon, Nov 02, 2015 at 04:40:33AM +0300, Andrey Repin wrote:
>>> net use //host/resource[/path] P: * /PERSISTENT /SAVECRED
>>
>> I got the following to be accepted:
>>
>> net use \\192.168.1.40\Public password /user:brown /persistant:yes
>>
>> The syntax doesn't have a place to where it should be mounted.
> 
> I missed that in my reply.  It has:
> 
>   net use X: \\server\share
> 
> when using this command in a Cygwin shell, keep in mind that backslashes
> need to be escaped in Unix shells:
> 
>   net use X: server\\share

or this works:
net use x: '\\server\share'
(single quotes)

> 
> 
> Corinna
> 


-- 
Roger Wells, P.E.
leidos
221 Third St
Newport, RI 02840
401-847-4210 (voice)
401-849-1585 (fax)
roger.k.we...@leidos.com

--
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: xterm 320-1 won't start with XTerm*faceName set in .Xresources

2015-11-02 Thread Yaakov Selkowitz
On Mon, 2015-11-02 at 15:52 -0500, Brian Neu wrote:
> Ran setup64.exe to update cygwin today, and then the xterm window 
> wouldn't come up.  I was able to troubleshoot it down to the 
> XTerm*faceName in my ~/.Xresources
> 
> Commented out, it works, but I much prefer the other font.  Any ideas?

Perhaps you are missing your preferred font.  What had you specified for
XTerm*faceName?

--
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: fstat st_size on open files on Parallels filesystem is wrong

2015-11-02 Thread Jonathan Lennox
On Monday, November 2 2015, "Corinna Vinschen" wrote to "cygwin@cygwin.com" 
saying:

> On Nov  2 08:08, Jonathan Lennox wrote:
> > On Monday, November 2 2015, "Corinna Vinschen" wrote to "cygwin@cygwin.com" 
> > saying:
> > 
> > > On Nov  2 04:38, Jonathan Lennox wrote:
> > > > Unfortunately, when I do "Run As Administrator" on MinTTY, the Mac 
> > > > drives
> > > > (/cygdrive/z and /cygdrive/y) don't show up. I don't know why that is.  
> > > > So I
> > > > can't test hard links as administrator.
> > > 
> > > That's a security feature of UAC.  You can change that in the registry.
> > > As administrator:
> > > 
> > >   regtool -d set 
> > > /HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Policies/System/EnableLinkedConnections
> > >  1
> > > 
> > > Then reboot.
> > 
> > Didn't work:
> > 
> > $ ls /cygdrive/
> > c  d  e
> > 
> > $ regtool get 
> > /HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Policies/System/EnableLinkedConnections
> > 
>  ^^^?
> 
> That should print "1"
> 
> EnableLinkedConnections is a DWORD value and should be set to 1.

Yes, sorry, it does print 1. Copy & Paste error.

Given "cyg Simple"'s comment, I guess I need to recreate the mapped drives as
the Administrator user?

> > > I added support for this filesystem (called prlfs in mount output) and
> > > without hardlink support for now.  I uploaded a new developer snapshot
> > > to https://cygwin.com/snapshots/ Please give it a try.
> > 
> > No, still seeing the failure in the snapshot:
> > 
> > $ ./stat-size-test.exe /cygdrive/y/foo ~/foo
> > /cygdrive/y/foo: fstat: st_size=0
> > /cygdrive/y/foo: stat: st_size=12
> > /home/jonathan/foo: fstat: st_size=12
> > /home/jonathan/foo: stat: st_size=12
> 
> Weird.  There should be no FileNetworkOpenInformation call anymore for
> Netapp and the PrlSF filesystem.
> 
> Does Cygwin correctly recognize the FS?  What does `mount' print?  It
> should print `type prlfs'.

$ mount
C:/cygwin64/bin on /usr/bin type ntfs (binary,auto)
C:/cygwin64/lib on /usr/lib type ntfs (binary,auto)
C:/cygwin64 on / type ntfs (binary,auto)
C: on /cygdrive/c type ntfs (binary,posix=0,user,noumount,auto)
D: on /cygdrive/d type iso9660 (binary,posix=0,user,noumount,auto)
E: on /cygdrive/e type iso9660 (binary,posix=0,user,noumount,auto)
U: on /cygdrive/u type prlsf (binary,posix=0,user,noumount,auto)
V: on /cygdrive/v type prlsf (binary,posix=0,user,noumount,auto)
W: on /cygdrive/w type prlsf (binary,posix=0,user,noumount,auto)
X: on /cygdrive/x type prlsf (binary,posix=0,user,noumount,auto)
Y: on /cygdrive/y type prlsf (binary,posix=0,user,noumount,auto)
Z: on /cygdrive/z type prlsf (binary,posix=0,user,noumount,auto)


> Can you please once again call `/usr/lib/csih/getVolInfo.exe Z:' and
> `/usr/lib/csih/getVolInfo.exe Y:' and paste the output here?  I'm not
> quite sure because the original getVolInfo call returned a filesystem
> type of "PrlSF", not "PrlFS" as I had expected.  Cygwin now checks for
> "PrlSF".
> 

$ /usr/lib/csih/getVolInfo.exe /cygdrive/z
Device Type: 7
Characteristics: 10
Volume Name: 
Serial Number  : 0
Max Filenamelength : 255
Filesystemname : 
Flags  : 3
  FILE_CASE_SENSITIVE_SEARCH  : TRUE
  FILE_CASE_PRESERVED_NAMES   : TRUE
  FILE_UNICODE_ON_DISK: FALSE
  FILE_PERSISTENT_ACLS: FALSE
  FILE_FILE_COMPRESSION   : FALSE
  FILE_VOLUME_QUOTAS  : FALSE
  FILE_SUPPORTS_SPARSE_FILES  : FALSE
  FILE_SUPPORTS_REPARSE_POINTS: FALSE
  FILE_SUPPORTS_REMOTE_STORAGE: FALSE
  FILE_VOLUME_IS_COMPRESSED   : FALSE
  FILE_SUPPORTS_OBJECT_IDS: FALSE
  FILE_SUPPORTS_ENCRYPTION: FALSE
  FILE_NAMED_STREAMS  : FALSE
  FILE_READ_ONLY_VOLUME   : FALSE
  FILE_SEQUENTIAL_WRITE_ONCE  : FALSE
  FILE_SUPPORTS_TRANSACTIONS  : FALSE

$ /usr/lib/csih/getVolInfo.exe /cygdrive/y
Device Type: 7
Characteristics: 10
Volume Name: 
Serial Number  : 0
Max Filenamelength : 255
Filesystemname : 
Flags  : 3
  FILE_CASE_SENSITIVE_SEARCH  : TRUE
  FILE_CASE_PRESERVED_NAMES   : TRUE
  FILE_UNICODE_ON_DISK: FALSE
  FILE_PERSISTENT_ACLS: FALSE
  FILE_FILE_COMPRESSION   : FALSE
  FILE_VOLUME_QUOTAS  : FALSE
  FILE_SUPPORTS_SPARSE_FILES  : FALSE
  FILE_SUPPORTS_REPARSE_POINTS: FALSE
  FILE_SUPPORTS_REMOTE_STORAGE: FALSE
  FILE_VOLUME_IS_COMPRESSED   : FALSE
  FILE_SUPPORTS_OBJECT_IDS: FALSE
  FILE_SUPPORTS_ENCRYPTION: FALSE
  FILE_NAMED_STREAMS  : FALSE
  FILE_READ_ONLY_VOLUME   : FALSE
  FILE_SEQUENTIAL_WRITE_ONCE  : FALSE
  FILE_SUPPORTS_TRANSACTIONS  : FALSE

(Note that the literal "/usr/lib/csih/getVolInfo.exe Z:" printed
"NtOpenFile(\??\C:\cygwin64\home\jonathan\Z:) failed, c033", so I assume
that's not what you want.)

-- 
Jonathan Lennox
len...@cs.columbia.edu

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

xterm 320-1 won't start with XTerm*faceName set in .Xresources

2015-11-02 Thread Brian Neu


Ran setup64.exe to update cygwin today, and then the xterm window 
wouldn't come up.  I was able to troubleshoot it down to the 
XTerm*faceName in my ~/.Xresources


Commented out, it works, but I much prefer the other font.  Any ideas?



2015/11/02 12:55:45 Extracting  
_update-info-dir/_update-info-dir-00488-1.tar.bz2
2015/11/02 12:55:45 Extracting  base-files/base-files-4.2-4.tar.xz
2015/11/02 12:55:45 Extracting  bash/bash-4.3.42-4.tar.xz
2015/11/02 12:55:47 Extracting  ca-certificates/ca-certificates-2.5-1.tar.xz
2015/11/02 12:55:47 Extracting  coreutils/coreutils-8.24-3.tar.xz
2015/11/02 12:55:51 Extracting  csih/csih-0.9.9-1.tar.xz
2015/11/02 12:55:51 Extracting  cygwin/cygwin-2.2.1-1.tar.xz
2015/11/02 12:55:54 Extracting  
cygwin/cygwin-devel/cygwin-devel-2.2.1-1.tar.xz
2015/11/02 12:55:56 Extracting  dos2unix/dos2unix-7.3.1-1.tar.xz
2015/11/02 12:55:57 Extracting  mesa/dri-drivers/dri-drivers-11.0.4-1.tar.xz
2015/11/02 12:55:57 Extracting  file/file-5.24-1.tar.xz
2015/11/02 12:55:58 Extracting  fontconfig/fontconfig-2.11.1-3.tar.xz
2015/11/02 12:55:58 Extracting  
gtk2.0/gtk2.0-engines-pixmap/gtk2.0-engines-pixmap-2.24.28-2.tar.xz
2015/11/02 12:55:58 Extracting  less/less-481-1.tar.xz
2015/11/02 12:55:58 Extracting  mesa/libEGL1/libEGL1-11.0.4-1.tar.xz
2015/11/02 12:55:58 Extracting  mesa/libGL1/libGL1-11.0.4-1.tar.xz
2015/11/02 12:55:58 Extracting  cairo/libcairo2/libcairo2-1.14.2-1.tar.xz
2015/11/02 12:55:59 Extracting  
fontconfig/libfontconfig1/libfontconfig1-2.11.1-3.tar.xz
2015/11/02 12:55:59 Extracting  
freetype2/libfreetype6/libfreetype6-2.5.5-2.tar.xz
2015/11/02 12:56:00 Extracting  
gdk-pixbuf2.0/libgdk_pixbuf2.0_0/libgdk_pixbuf2.0_0-2.31.7-1.tar.xz
2015/11/02 12:56:02 Extracting  mesa/libglapi0/libglapi0-11.0.4-1.tar.xz
2015/11/02 12:56:02 Extracting  
gnutls/libgnutls28/libgnutls28-3.3.17-1.tar.xz
2015/11/02 12:56:02 Extracting  
krb5/libgssapi_krb5_2/libgssapi_krb5_2-1.13.2-2.tar.xz
2015/11/02 12:56:02 Extracting  
gtk2.0/libgtk2.0_0/libgtk2.0_0-2.24.28-2.tar.xz
2015/11/02 12:56:04 Extracting  
harfbuzz/libharfbuzz0/libharfbuzz0-1.0.5-1.tar.xz
2015/11/02 12:56:04 Extracting  gettext/libintl8/libintl8-0.19.5.1-2.tar.xz
2015/11/02 12:56:04 Extracting  
libjpeg-turbo/libjpeg8/libjpeg8-1.4.2-1.tar.xz
2015/11/02 12:56:04 Extracting  
krb5/libk5crypto3/libk5crypto3-1.13.2-2.tar.xz
2015/11/02 12:56:04 Extracting  krb5/libkrb5_3/libkrb5_3-1.13.2-2.tar.xz
2015/11/02 12:56:04 Extracting  
krb5/libkrb5support0/libkrb5support0-1.13.2-2.tar.xz
2015/11/02 12:56:04 Extracting  
mysql/libmysqlclient18/libmysqlclient18-5.5.45-1.tar.xz
2015/11/02 12:56:05 Extracting  
ncurses/libncursesw10/libncursesw10-6.0-1.20151017.tar.xz
2015/11/02 12:56:05 Extracting  pcre/libpcre1/libpcre1-8.37-2.tar.xz
2015/11/02 12:56:05 Extracting  
pixman/libpixman1_0/libpixman1_0-0.32.8-1.tar.xz
2015/11/02 12:56:05 Extracting  libpng/libpng16/libpng16-1.6.18-1.tar.xz
2015/11/02 12:56:05 Extracting  
sqlite3/libsqlite3_0/libsqlite3_0-3.9.0-1.tar.xz
2015/11/02 12:56:05 Extracting  libtasn1/libtasn1_6/libtasn1_6-4.5-1.tar.xz
2015/11/02 12:56:05 Extracting  tiff/libtiff6/libtiff6-4.0.6-1.tar.xz
2015/11/02 12:56:05 Extracting  libvpx/libvpx1/libvpx1-1.3.0-2.tar.xz
2015/11/02 12:56:06 Extracting  vte/libvte9/libvte9-0.28.2-6.tar.xz
2015/11/02 12:56:06 Extracting  
libxcb/libxcb-glx0/libxcb-glx0-1.11.1-1.tar.xz
2015/11/02 12:56:06 Extracting  
libxcb/libxcb-render0/libxcb-render0-1.11.1-1.tar.xz
2015/11/02 12:56:07 Extracting  
libxcb/libxcb-shm0/libxcb-shm0-1.11.1-1.tar.xz
2015/11/02 12:56:07 Extracting  libxcb/libxcb1/libxcb1-1.11.1-1.tar.xz
2015/11/02 12:56:07 Extracting  man-db/man-db-2.7.4-1.tar.xz
2015/11/02 12:56:08 Extracting  mintty/mintty-2.1.5-0.tar.xz
2015/11/02 12:56:09 Extracting  mysql/mysql-5.5.45-1.tar.xz
2015/11/02 12:56:11 Extracting  openssh/openssh-7.1p1-1.tar.xz
2015/11/02 12:56:12 Extracting  perl-CGI/perl-CGI-4.21-1.tar.xz
2015/11/02 12:56:12 Extracting  
perl-HTML-Parser/perl-HTML-Parser-3.71-3.tar.xz
2015/11/02 12:56:12 Extracting  
perl-HTML-Tagset/perl-HTML-Tagset-3.20-5.tar.xz
2015/11/02 12:56:13 Extracting  
perl-Pod-Simple/perl-Pod-Simple-3.31-1.tar.xz
2015/11/02 12:56:13 Extracting  php/php-5.6.14-2.tar.xz
2015/11/02 12:56:14 Extracting  php/php-gd/php-gd-5.6.14-2.tar.xz
2015/11/02 12:56:14 Extracting  php/php-mssql/php-mssql-5.6.14-2.tar.xz
2015/11/02 12:56:14 Extracting  
php/php-pdo_mysql/php-pdo_mysql-5.6.14-2.tar.xz
2015/11/02 12:56:15 Extracting  pwget/pwget-2015.0927+git36776ae-1.tar.xz
2015/11/02 12:56:15 Extracting  run/run-1.3.4-2.tar.xz
2015/11/02 12:56:15 Extracting  screen/screen-4.3.1-2.tar.xz
2015/11/02 12:56:16 Extracting  
ncurses/terminfo/terminfo-6.0-1.20151017.tar.xz
2015/11/02 12:56:21 Extracting  tmux/tmux-2.1-1.tar.xz
2015/11/02 

Re: Questions on package adoption conventions

2015-11-02 Thread Corinna Vinschen
On Oct 31 21:15, Mark Geisert wrote:
> On Sat, 31 Oct 2015, Corinna Vinschen wrote:
> >On Oct 31 00:18, Jon Turney wrote:
> >>On 30/10/2015 23:25, Mark Geisert wrote:
> >>>I was confused by the SRC_URI= line in cygutils.cygport.  Does that
> >>>merely indicate where this package came from at the time the .cygport
> >>>file was written, or does it denote a commitment by the maintainer to
> >>>continue hosting the package from that URI?  If the latter, that's why I
> >>>was asking about access methods.  Is SRC_URI required?
> >>
> >>SRC_URI is the URI for the upstream source.
> >>
> >>cygport's fetch (aka download) subcommand will fetch the upstream source
> >>from the specified SRC_URI
> >>
> >>cygutils is somewhat a special case as cygwin is the upstream :)
> >>
> >>The sources are in CVS at pserver:anon...@sourceware.org:/cvs/cygwin-apps,
> >>but the tarballs seem to be hosted on fruitbat.org at the moment.
> >>
> >>I think the best thing to do is to ask for that CVS to be migrated to git,
> >
> >Done:
> >
> > git clone git://sourceware.org/git/cygwin-cygutils.git
> >
> > Gitweb: https://sourceware.org/git/?p=cygwin-cygutils.git
> >
> >Mark, if you're going to maintain the project, you probably want to
> >make changes to the git repo.  For that you need ssh access to
> >sourceware.org AKA cygwin.com.  Pleae use the form at
> >
> > https://sourceware.org/cgi-bin/pdw/ps_form.cgi
> >
> >to request SSH access to sware.  Project is "cygwin-apps", Use my
> >email address for the approver field.
> >
> >>then the cygport can be written to fetch the source directly from a
> >>specified tag in git, since this will avoid the need for you to make
> >>tarballs and work out where to host them.
> >
> >E.g.
> >
I forgot one line here:

> > GIT_URI="git://cygwin.com/git/newlib-cygwin.git"
> > GIT_TAG="..."
inherit git

> This does seems like the best way to go, for several reasons.  I've sent in
> the SSH access request form.
> Thanks much!

Approved.  You should get a mail from sware overseers shorty.


Corinna

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


pgpvANbh8WO7L.pgp
Description: PGP signature


Re: fstat st_size on open files on Parallels filesystem is wrong

2015-11-02 Thread Jonathan Lennox
On Wednesday, October 21 2015, "Corinna Vinschen" wrote to "cygwin@cygwin.com" 
saying:

> On Oct  8 12:16, Jonathan Lennox wrote:
> > Hi, following up on this issue from last year.  The message I'm replying to
> > is at .
> > 
> > The problem is weird behavior in Parallels Desktop-hosted Windows VMs, when
> > accessing the host's native Mac OS X filesystem.  See the thread for the
> > details.
> > 
> > On Wednesday, April 23 2014, "Corinna Vinschen" wrote to 
> > "cygwin@cygwin.com" saying:
> > 
> > > > At this point this is looking pretty clearly like a Parallels Tools bug.
> > > > I'll report it to them.
> > > 
> > > Yes, that sounds good.  Given that, I'm wondering if we should try to
> > > workaround this problem at all or rather wait to see if the vendor will
> > > fix the issue.
> > 
> > No such luck, despite two major version revisions of Parallels Desktop (I'm
> > now on version 11.0.2) and moving to Windows 10 as the guest OS -- the bug
> > perists, unchanged.  So it looks like Cygwin will need to add a workaround
> > for this filesystem to fix the problem.
> 
> Ok, we could do that.  Can you compile and run the testcase from
> https://cygwin.com/ml/cygwin/2014-04/msg00523.html again?  Does it
> still show 0 vs. 12 bytes?  Dumb extra test: Does the output change
> if you reorder the calls, requesting FileStandardInformation first,
> FileNetworkOpenInformation second?

I re-ran the test, no change. Changing the order gives the same result --
FileStandardInformation works, FileNetworkOpenInformation doesn't.

> Just create a hardlink on that drive using native means:
> 
>   $ touch foo
>   $ cmd /c mklink /h bar foo
> 
> Error at this point?  No hardlinks.  Otherwise:

"You do not have sufficient privilege to perform this operation."  Is that
sufficient proof?

Unfortunately, when I do "Run As Administrator" on MinTTY, the Mac drives
(/cygdrive/z and /cygdrive/y) don't show up. I don't know why that is.  So I
can't test hard links as administrator.

>   $ ls -li foo bar
> 
> Are the inode numbers identical?  Congrats, hardlinks work.  But given
> the general FAT-iness of the getVolInfo output, I guess it doesn't
> maintain hardlinks.

However, when I create a hardlink on the underlying (Mac) file system, the
inode numbers that Cygwin shows are not identical.  So "no hardlinks" seems
very likely.

-- 
Jonathan Lennox
lennox at cs dot columbia dot edu

--
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: Pop up GUI remotely via SSH

2015-11-02 Thread trimat
@Larry thanks for the answer.



--
View this message in context: 
http://cygwin.1069669.n5.nabble.com/Pop-up-GUI-remotely-via-SSH-tp122269p122467.html
Sent from the Cygwin list mailing list archive at Nabble.com.

--
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: [ANNOUNCEMENT] Updated: zsh-5.1.1-1

2015-11-02 Thread Ismail Donmez
Hi,

Peter A. Castro  fruitbat.org> writes:

> 
> An updated version of zsh (zsh-5.1.1-1) has been released and should be
> at a mirror near you real soon.  This is an upstream release.

Thank you!



--
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: [ITP] Inetutils 1.9.4

2015-11-02 Thread Corinna Vinschen
{Forgot to CC Gernot, sorry]

On Nov  2 10:56, Corinna Vinschen wrote:
> On Nov  2 08:02, D. Boland wrote:
> > Marco Atzeri wrote:
> > >On 01/11/2015 15:19, D. Boland wrote:
> > >>Marco Atzeri wrote:
> > >>Arghh! I also forgot I had to install (copy) some missing include files.
> > >>Thanks for checking this.
> > >>
> > >>I got these from the glibc-2.21 source code:
> 
> Please use BSD files, not glibc, for licensing reasons.
> 
> > >>/usr/include/arpa/tftp.h
> > >
> > >tftp has this
> > >https://cygwin.com/packages/x86_64/tftp/tftp-5.2-1
> > >
> > >>/usr/include/netinet/icmp6.h
> > >
> > >not yet included
> > >https://cygwin.com/cgi-bin2/package-grep.cgi?grep=icmp6.h=x86_64
> > >
> > >>
> > >>The MAX_IPOPTLEN constant is in ip_var.h. I got that from OpenBSD source:
> > >>
> > >>/usr/include/netinet/ip_var.h
> > >>
> > >>The latter I also needed for my Sendmail package.
> 
> We can add the definition of MAX_IPOPTLEN to /usr/include/netinet/ip.h
> for Cygwin 2.3.0, as on Linux.
> 
> > Also, the following
> > >>Cygwin packages are required to compile the source code:
> > >>
> > >>help2man
> > >>perl-Locale-gettext
> > >>
> > >>After this, it should compile. Are these files included in any Cygwin
> > >>package? Is there an elegant way to include these in my source package?
> > >>
> > 
> > So how do I do this? I could include icmp6.h and ip_var.h in the source
> > package and conditionally install it to /usr/include in the 'src_compile'
> > handler, previous to the 'make' command.
> > 
> > I'll leave tftp out of the distribution. That subpackage of inetutils is
> > maintained by Gernot Hiller.
> > 
> > On the other hand, I'd be happy to adopt it...
> 
> Let's see if Gernot is still available.  There was no update to tftp
> since early 2012.  Gernot, you're still with us?  Care to chime in
> here?  Thanks.
> 
> Whatever the outcome, the tftp.h header should stay with the inetutils
> or tftp package, otherwise we need to manage a smooth handover to the
> Cygwin package.  As for icmp6.h, we could include the FreeBSD version
> with Cygwin 2.3.0.
> 
> 
> Corinna
> 
> -- 
> Corinna Vinschen  Please, send mails regarding Cygwin to
> Cygwin Maintainer cygwin AT cygwin DOT com
> Red Hat


pgpjOZ6QLnnnO.pgp
Description: PGP signature


Re: TP_NUM_C_BUFS too small

2015-11-02 Thread Helmut Karlowski

Am 02.11.2015, 12:15 Uhr, schrieb Corinna Vinschen:

Glad it's fixed!  For the record, could you say what sort of bug would  
cause

a fatal internal error like that?
Just curious,


Me too.  Sounds like some kind of recursion.


It all happened after I had replaced all strcpy/strcat by strlcpy like  
this:


strcpy(t,s) -> pos = strlcpy(t,s,size)
strcat(t,s) -> pos += strlcpy(t+pos,s,size-pos)

At some point the pos-parameter was wrong and the resulting string became  
something undesired. And that string probably was passed to fopen, maybe  
pos became very large way beyond the boundaries of the string which is  
from the stack.


It's hard to reproduce what happened in a simple case, and I was in some  
hurry then, but I saved the strace-output:


  459 4265672 [main] ue 460 open: open(u, 0x0)
   33 4265705 [main] ue 460 normalize_posix_path: src u
   33 4265738 [main] ue 460 cwdstuff::get: posix /usr/src/ue314/bin
   32 4265770 [main] ue 460 cwdstuff::get: (/usr/src/ue314/bin) =  
cwdstuff::get (0x8008, 32768, 1, 0), errno 2
   33 4265803 [main] ue 460 normalize_posix_path: /usr/src/ue314/bin/u =  
normalize_posix_path (u)
   33 4265836 [main] ue 460 mount_info::conv_to_win32_path:  
conv_to_win32_path (/usr/src/ue314/bin/u)

   33 4265869 [main] ue 460 set_flags: flags: binary (0x2)
   33 4265902 [main] ue 460 mount_info::conv_to_win32_path: src_path  
/usr/src/ue314/bin/u, dst C:\cygwin\usr\src\ue314\bin\u, flags 0x3000A, rc  
0
   63 4265965 [main] ue 460 symlink_info::check: 0x0 = NtCreateFile  
(\??\C:\cygwin\usr\src\ue314\bin\u)

   49 4266014 [main] ue 460 symlink_info::check: not a symlink
   47 4266061 [main] ue 460 symlink_info::check: 0 =  
symlink.check(C:\cygwin\usr\src\ue314\bin\u, 0x29B598) (0x3000A)
   35 4266096 [main] ue 460 path_conv::check:  
this->path(C:\cygwin\usr\src\ue314\bin\u), has_acls(1)

   37 4266133 [main] ue 460 build_fh_pc: fh 0x61302754, dev 00C3
   34 4266167 [main] ue 460 fhandler_base::open:  
(\??\C:\cygwin\usr\src\ue314\bin\u, 0x108000)
   70 4266237 [main] ue 460 fhandler_base::set_flags: flags 0x108000,  
supplied_bin 0x1
   34 4266271 [main] ue 460 fhandler_base::set_flags: filemode set to  
binary
   33 4266304 [main] ue 460 fhandler_base::open: 0x0 = NtCreateFile  
(0x170, 0x8010, \??\C:\cygwin\usr\src\ue314\bin\u, io, NULL, 0x0, 0x7,  
0x1, 0x4020, NULL, 0)
   35 4266339 [main] ue 460 fhandler_base::open: 1 =  
fhandler_base::open(\??\C:\cygwin\usr\src\ue314\bin\u, 0x108000)
   41 4266380 [main] ue 460 fhandler_base::open_fs: 1 =  
fhandler_disk_file::open(\??\C:\cygwin\usr\src\ue314\bin\u, 0x8000)

   34 4266414 [main] ue 460 open: 3 = open(u, 0x8000)
  186 4266600 [main] ue 460 _cygwin_istext_for_stdio: fd 3: opened as  
binary

  232 4266832 [main] ue 460 close: close(3)
   32 4266864 [main] ue 460 fhandler_base::close: closing  
'/usr/src/ue314/bin/u' handle 0x170

   49 4266913 [main] ue 460 close: 0 = close(3)
  460 4267373 [main] 20 460 open: open(u, 0x0)

This loops some 100 times, then:

  460 4267373 [main] 20 460 open: open(u, 0x0)
   32 4267405 [main] 20 460 normalize_posix_path: src u
   32 4267437 [main] 20 460 cwdstuff::get: posix /usr/src/ue314/bin
   33 4267470 [main] 20 460 cwdstuff::get: (/usr/src/ue314/bin) =  
cwdstuff::get (0x8008, 32768, 1, 0), errno 2
   33 4267503 [main] 20 460 normalize_posix_path: /usr/src/ue314/bin/u =  
normalize_posix_path (u)
   32 4267535 [main] 20 460 mount_info::conv_to_win32_path:  
conv_to_win32_path (/usr/src/ue314/bin/u)

   34 4267569 [main] 20 460 set_flags: flags: binary (0x2)
   32 4267601 [main] 20 460 mount_info::conv_to_win32_path: src_path  
/usr/src/ue314/bin/u, dst C:\cygwin\usr\src\ue314\bin\u, flags 0x3000A, rc  
0
   59 4267660 [main] 20 460 symlink_info::check: 0x0 = NtCreateFile  
(\??\C:\cygwin\usr\src\ue314\bin\u)

   50 4267710 [main] 20 460 symlink_info::check: not a symlink
   47 4267757 [main] 20 460 symlink_info::check: 0 =  
symlink.check(C:\cygwin\usr\src\ue314\bin\u, 0x29B598) (0x3000A)
   35 4267792 [main] 20 460 path_conv::check:  
this->path(C:\cygwin\usr\src\ue314\bin\u), has_acls(1)

   36 4267828 [main] 20 460 build_fh_pc: fh 0x61302754, dev 00C3
   33 4267861 [main] 20 460 fhandler_base::open:  
(\??\C:\cygwin\usr\src\ue314\bin\u, 0x108000)
   72 4267933 [main] 20 460 fhandler_base::set_flags: flags 0x108000,  
supplied_bin 0x1
   34 4267967 [main] 20 460 fhandler_base::set_flags: filemode set to  
binary
   33 4268000 [main] 20 460 fhandler_base::open: 0x0 = NtCreateFile  
(0x16C, 0x8010, \??\C:\cygwin\usr\src\ue314\bin\u, io, NULL, 0x0, 0x7,  
0x1, 0x4020, NULL, 0)
   34 4268034 [main] 20 460 fhandler_base::open: 1 =  
fhandler_base::open(\??\C:\cygwin\usr\src\ue314\bin\u, 0x108000)
   42 4268076 [main] 20 460 fhandler_base::open_fs: 1 =  
fhandler_disk_file::open(\??\C:\cygwin\usr\src\ue314\bin\u, 0x8000)

   34 4268110 [main] 20 460 open: 3 = open(u, 0x8000)
  186 4268296 [main] 20 460 _cygwin_istext_for_stdio: fd 3: opened as  

Re: Using cp converts windows junctions to a cywin symlink; a security-config override

2015-11-02 Thread Linda Walsh

Andrey Repin wrote:
Greetings, Adrian H!


> I was copying a directory of files, some of which were windows junctions.
> These got converted to a cygwin symlink.  Although I am impressed that there
> are such a thing for those OSs/drives that do not support such things, for 
those
> that do, I think it would be good to keep the copy a junction.  Otherwise,
> things can get messy.



> Can this be corrected?

---

(BTW -- you do know about the 'winsymlinks:native' setting in the
CYGWIN environment variable?  It might be of some use.)

Andrey wrote:

Unfortunately, even on systems, that do support symlinks functionality,
it is restricted by UAC and not easily unlocked.
--- 
Actually that's control by Windows group policy.


It's alot like whether not 'users' can control 'mounts' on linux.
It can be allowed, but doing so categorically might not be considered
wise.


You'd need an admin shell or a user profile with UAC turned off and
permissions correctly configured to exploit native symlinks.
--- 
Or the system administrator would have to enable user-control of local

symlinks.

The ability to allow users to create and use symlinks is control through
4 settings:


fsutil behavior query SymlinkEvaluation
* Local to local symbolic links are enabled.  
* Local to remote symbolic links are enabled.  
* Remote to local symbolic links are enabled.  
* Remote to remote symbolic links are enabled.


--- 


On my windows machine, unprivileged users are able to create all 4 types
of symbolic links.

As for junctions and mountvols -- they require the same privileges on
windows as they do on linux.

I.e. a normal user can't mount or graft portions of the file system other
places -- mount is normally restricted to root-only.  Having cygwin
destroy/overwrite linux-comparable 'mounts' would be and should be
considered a serious security bug.

If I mount a linux dir at another location -- imagine if 'cp' changed
those mount point to symbolic links (which no longer work consistently or
the same on linux as they use to, as some security-spazes came up with the
idea that being able to create a symlink (not hardlink) to a file you
don't own, was considered a security risk -- even though in reality
symlinks are safer than hardlinks in such cases, because the symlinks have
to traverse the intervening directories and security checks.  On windows,
the "allow traversing paths you don't have access to" is a privilege that
has been used to allow users access to area they didn't normally have
access to.  However, on linux there never was such a privilege, so the
added the ability to mount normally "private" areas in other places --
going around the intermediate path-walk-security checks.  


Now with the mount option, the default on most distros is to disable
creating symlinks to files you don't own -- which doesn't serve the same
purpose -- since such symlinks STILL follow all the intervening security
checks at each directory.

Note--disabling the windows privilege to bypass traversed directory
security checks would achieve the same effect on windows as it does on
linux, but MS strongly advises against doing this, as so much software
makes use of this feature and assumes it is in place (it is the default).

To find out more about the linux google on
/proc/sys/fs/protected_hardlinks & /proc/sys/fs/protected_symlinks


And Cygwin does not support creation of directory junctions to the best
of my knowledge. :(

---
Neither does linux support creation of user-controlled mounts.


Not have cygwin destroy "volume mount points" that are
a parallel to linux's ability to mount any directory anywhere else, would
be very useful. Destroying the mountpoints as it does now, is
a hacker's dream, as they can destroy a local admin's mounting
of a read-only dir there and allow potentially virus laden programs
to replace them.

Nice.




--
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: Mounting a network share

2015-11-02 Thread Linda Walsh

Andrey Repin wrote:

Greetings, Mike Brown!


I'm remotely loggin in to my P box and would lke to mount one of the NAS
Samba shares.  M$ likes to unmount the share after a period of time,
but because it was mounted, the pasword is needed (I hope).



When I try the following:



mount \\192.168.1.40\Public /cygdrive/p

---
Got to watch out for the those backslashes:

This seems to work:


mount //ishtar/tmp /tmp/tmnt

mount: defaulting to 'notexec' mount option for speed since native path
  references a remote share.  Use '-f' option to override.
/tmp> df /tmp/tmnt
Filesystem  Size  Used Avail Use% Mounted on
//ishtar/tmp   12G  8.4G  3.7G  70% /tmp/tmnt

Though I'd likely use 'net use' as others mentioned.



--
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: pthread_kill: signals remain pending after target thread exits

2015-11-02 Thread John Carey
> From: Corinna Vinschen [corinna-cyg...@cygwin.com]
> Sent: Monday, November 02, 2015 9:58 AM
> On Nov  2 15:18, Corinna Vinschen wrote:
> > On Oct 29 16:16, John Carey wrote:
> > > > From: Corinna Vinschen [corinna-cyg...@cygwin.com]
> > > > Sent: Thursday, October 29, 2015 1:02 AM
> > > > On Oct 28 10:14, Corinna Vinschen wrote:
> > > ...
> > > > > > Thanks; that was fast!  I tried replacing cygwin1.dll with 
> > > > > > cygwin1-20151023.dll .
> > > > > >
> > > > > > The original test case now works.  I checked some of my other tests,
> > > > > > and unfortunately some of them failed, so I extracted out a new test
> > > > > > case, which is attached.  My guess is that something is subtly 
> > > > > > different
> > > > > > about the timing on this test.
> > > > >
> > > > > Is this a regression?  Did it work with 2.2.1?
> > > >
> > > > Answering myself here, this didn't work at all in 2.2.1.  I can
> > > > reproduce the problem and I'm going to take a look.  Not sure if
> > > > there's a quick solution, though.  This looks like a deadlock
> > > > situation.  The signal definitely got send, I just don't see yet
> > > > why it's not handled in wait_sig.
> > >
> > > Yes, test_pending_signal2.c fails in 2.2.1, though the symptoms
> > > differ: there is no Cygwin process left hanging that cannot be
> > > killed by a Cygwin signal.
> > >
> > > But both tests appear to pass in Cygwin 1.7.9, so in that sense
> > > it is a regression, just not a recent one.
> >
> > The regression here was my original fix.  It didn't clear pending
> > signals for an exiting thread thorougly enough.  I applied a patch now
> > which should fix this issue.  I'll upload a new developer snapshot to
> > https://cygwin.com/snapshots/ later today or tomorrow (still looking
> > into the PrlFS issue).  Please give it a try.
> 
> Snapshot is up.  The fix is in the 2.3.0-0.5 test release as well.
> Please give any one of them a try.

I tested snapshot cygwin1-20151102.dll, and it works in all of my tests.  Nice!

I'm glad you figured out how to delete those pending signals.

Thanks,
John Carey

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



New: spice-0.12.6-1, xf86-video-qxl-0.1.4-1 (64-bit only)

2015-11-02 Thread Yaakov Selkowitz
The following packages have been added to the 64-bit distribution only:

* libspice-server1-0.12.6-1
* libspice-server-devel-0.12.6-1
* xf86-video-qxl-0.1.4-1

The Spice project aims to provide a complete open source solution
for interaction with virtualized desktop devices.  These packages
provide a Spice driver for the Xorg server, along with the Xspice script
for customising the launching of the server with this driver.  Due to
limitations of the Spice protocol, these packages are only available for
the 64-bit distribution.

--
Yaakov




[ANNOUNCEMENT] New: spice-0.12.6-1, xf86-video-qxl-0.1.4-1 (64-bit only)

2015-11-02 Thread Yaakov Selkowitz
The following packages have been added to the 64-bit distribution only:

* libspice-server1-0.12.6-1
* libspice-server-devel-0.12.6-1
* xf86-video-qxl-0.1.4-1

The Spice project aims to provide a complete open source solution
for interaction with virtualized desktop devices.  These packages
provide a Spice driver for the Xorg server, along with the Xspice script
for customising the launching of the server with this driver.  Due to
limitations of the Spice protocol, these packages are only available for
the 64-bit distribution.

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



[newlib-cygwin] Consistently use an em-dash in math functions.

2015-11-02 Thread Jeff Johnston
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=53617ce4e634bd6f67e6e08939518dba77dee3f1

commit 53617ce4e634bd6f67e6e08939518dba77dee3f1
Author: Jeff Johnston 
Date:   Mon Nov 2 16:38:30 2015 -0500

Consistently use an em-dash in math functions.

- also move previous ChangeLog entry to newlib instead of top-level

* libc/time/wcsftime.c: Consistently use an em-dash in FUNCTION
summary.
* libm/common/isgreater.c: Ditto.
* libm/common/s_fdim.c: Ditto.
* libm/common/s_fma.c: Ditto.
* libm/common/s_fmax.c: Ditto.
* libm/common/s_fmin.c: Ditto.
* libm/common/s_infinity.c: Ditto.
* libm/common/s_isnan.c: Ditto.
* libm/common/s_log2.c: Ditto.
* libm/common/s_logb.c: Ditto.
* libm/common/s_lrint.c: Ditto.
* libm/common/s_lround.c: Ditto.
* libm/common/s_nearbyint.c: Ditto.
* libm/common/s_remquo.c: Ditto.
* libm/common/s_rint.c: Ditto.
* libm/common/s_round.c: Ditto.
* libm/common/s_scalbn.c: Ditto.
* libm/common/s_signbit.c: Ditto.
* libm/common/s_trunc.c: Ditto.
* libm/math/w_exp2.c: Ditto.
* libm/math/w_gamma.c: Ditto.

Diff:
---
 ChangeLog| 13 -
 newlib/ChangeLog | 38 ++
 newlib/libc/time/wcsftime.c  |  2 +-
 newlib/libm/common/isgreater.c   |  2 +-
 newlib/libm/common/s_fdim.c  |  2 +-
 newlib/libm/common/s_fma.c   |  2 +-
 newlib/libm/common/s_fmax.c  |  2 +-
 newlib/libm/common/s_fmin.c  |  2 +-
 newlib/libm/common/s_infinity.c  |  2 +-
 newlib/libm/common/s_isnan.c |  2 +-
 newlib/libm/common/s_log2.c  |  2 +-
 newlib/libm/common/s_logb.c  |  2 +-
 newlib/libm/common/s_lrint.c |  2 +-
 newlib/libm/common/s_lround.c|  2 +-
 newlib/libm/common/s_nearbyint.c |  2 +-
 newlib/libm/common/s_remquo.c|  2 +-
 newlib/libm/common/s_rint.c  |  2 +-
 newlib/libm/common/s_round.c |  2 +-
 newlib/libm/common/s_scalbn.c|  2 +-
 newlib/libm/common/s_signbit.c   |  2 +-
 newlib/libm/common/s_trunc.c |  2 +-
 newlib/libm/math/w_exp2.c|  2 +-
 newlib/libm/math/w_gamma.c   |  2 +-
 23 files changed, 59 insertions(+), 34 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 487b1d3..547474a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,16 +1,3 @@
-2015-11-02  Jon Turney  
-
-   * libc/stdio/fseek.c: Add missing semicolons to prototypes in
-   SYNOPSIS.
-   * libc/stdio/fwide.c: Ditto.
-   * libc/stdio64/fseeko64.c: Ditto.
-   * libc/string/strtok.c: Ditto.
-   * libc/string/wcstok.c: Ditto.
-   * libm/math/w_cosh.c: Ditto.
-   * libm/math/w_fmod.c:  Ditto.
-   * libm/mathfp/s_cosh.c: Ditto.
-   * libm/mathfp/s_fmod.c: Ditto.
-
 2015-09-22  Mike Frysinger  
 
* config.guess: Update from config repo.
diff --git a/newlib/ChangeLog b/newlib/ChangeLog
index d46870b..cb87b2c 100644
--- a/newlib/ChangeLog
+++ b/newlib/ChangeLog
@@ -1,3 +1,41 @@
+2015-11-02  Jon Turney  
+
+* libc/time/wcsftime.c: Consistently use an em-dash in FUNCTION
+summary.
+* libm/common/isgreater.c: Ditto.
+* libm/common/s_fdim.c: Ditto.
+* libm/common/s_fma.c: Ditto.
+* libm/common/s_fmax.c: Ditto.
+* libm/common/s_fmin.c: Ditto.
+* libm/common/s_infinity.c: Ditto.
+* libm/common/s_isnan.c: Ditto.
+* libm/common/s_log2.c: Ditto.
+* libm/common/s_logb.c: Ditto.
+* libm/common/s_lrint.c: Ditto.
+* libm/common/s_lround.c: Ditto.
+* libm/common/s_nearbyint.c: Ditto.
+* libm/common/s_remquo.c: Ditto.
+* libm/common/s_rint.c: Ditto.
+* libm/common/s_round.c: Ditto.
+* libm/common/s_scalbn.c: Ditto.
+* libm/common/s_signbit.c: Ditto.
+* libm/common/s_trunc.c: Ditto.
+* libm/math/w_exp2.c: Ditto.
+* libm/math/w_gamma.c: Ditto.
+
+2015-11-02  Jon Turney  
+
+* libc/stdio/fseek.c: Add missing semicolons to prototypes in
+SYNOPSIS.
+* libc/stdio/fwide.c: Ditto.
+* libc/stdio64/fseeko64.c: Ditto.
+* libc/string/strtok.c: Ditto.
+* libc/string/wcstok.c: Ditto.
+* libm/math/w_cosh.c: Ditto.
+* libm/math/w_fmod.c:  Ditto.
+* libm/mathfp/s_cosh.c: Ditto.
+* libm/mathfp/s_fmod.c: Ditto.
+
 2015-11-02  Steve Ellcey  
 
* libc/machine/mips/memcpy.S (memcpy): Add word copies for small
diff --git a/newlib/libc/time/wcsftime.c b/newlib/libc/time/wcsftime.c
index ac71a09..f77b3d0 100644
--- a/newlib/libc/time/wcsftime.c
+++ b/newlib/libc/time/wcsftime.c
@@ -8,7 +8,7 @@
 
 /*
 FUNCTION
-<>--convert date 

[newlib-cygwin] Created tag newlib-snapshot-20151023

2015-11-02 Thread Jeff Johnston
The unsigned tag 'newlib-snapshot-20151023' was created pointing to:

 cf51db8... Clear pending signals targeting exiting thread

Tagger: Jeff Johnston 
Date: Mon Nov 2 18:16:24 2015 -0500

Newlib snapshot for 10/23/2015.


Re: Pop up GUI remotely via SSH

2015-11-02 Thread Linda Walsh

trimat wrote:

Hi all,
I would like to pup up on Windows 7 the GUI of a program started remotely
from SSH. I can't obtain this with *cygstart* even though I see the process
running in Windows Task Manager. Trying to add /--interactive/ flag to
Cygwin service /sshd/, the service doesn't start.


	Am unclear here.  


Where are you starting ssh from and where is sshd running?

Are you trying - say, when you login to windows, 1st have it
run the Xserver, then have a 2nd program run ssh to a remote (linux? 
Windows?) machine, where it starts an X-GUI, on the remote (linux? cygwin

on windows?) that display back on the machine you just logged into?

Are you are you have the Xserver running locally before you run
the ssh command?

--
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] New: opencv-2.4.11-1

2015-11-02 Thread Yaakov Selkowitz
The following packages have been added to the Cygwin distribution:

* libopencv2.4-2.4.11-1
* libopencv-devel-2.4.11-1
* python-cv-2.4.11-1

OpenCV (Open Source Computer Vision) is a library of programming
functions for real time computer vision. Example applications of the
OpenCV library are Human-Computer Interaction; Object Identification,
Segmentation and Recognition; Face Recognition; Gesture Recognition;
Camera and Motion Tracking, Ego Motion, Motion Understanding; Structure
>From Motion; Stereo and Multi-Camera Calibration and Depth Computation;
Mobile Robotics.

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



New: opencv-2.4.11-1

2015-11-02 Thread Yaakov Selkowitz
The following packages have been added to the Cygwin distribution:

* libopencv2.4-2.4.11-1
* libopencv-devel-2.4.11-1
* python-cv-2.4.11-1

OpenCV (Open Source Computer Vision) is a library of programming
functions for real time computer vision. Example applications of the
OpenCV library are Human-Computer Interaction; Object Identification,
Segmentation and Recognition; Face Recognition; Gesture Recognition;
Camera and Motion Tracking, Ego Motion, Motion Understanding; Structure
>From Motion; Stereo and Multi-Camera Calibration and Depth Computation;
Mobile Robotics.

--
Yaakov




[newlib-cygwin] Add missing semicolons to prototypes.

2015-11-02 Thread Jeff Johnston
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=72e18faf625a9644b4d1fd8957433db482c42aae

commit 72e18faf625a9644b4d1fd8957433db482c42aae
Author: Jeff Johnston 
Date:   Mon Nov 2 16:34:49 2015 -0500

Add missing semicolons to prototypes.

* libc/stdio/fseek.c: Add missing semicolons to prototypes in
SYNOPSIS.
* libc/stdio/fwide.c: Ditto.
* libc/stdio64/fseeko64.c: Ditto.
* libc/string/strtok.c: Ditto.
* libc/string/wcstok.c: Ditto.
* libm/math/w_cosh.c: Ditto.
* libm/math/w_fmod.c:  Ditto.
* libm/mathfp/s_cosh.c: Ditto.
* libm/mathfp/s_fmod.c: Ditto.

Diff:
---
 ChangeLog  | 13 +
 newlib/libc/stdio/fseek.c  | 16 
 newlib/libc/stdio/fwide.c  |  8 
 newlib/libc/stdio64/fseeko64.c |  8 
 newlib/libc/string/strtok.c| 12 ++--
 newlib/libc/string/wcstok.c|  4 ++--
 newlib/libm/math/w_cosh.c  |  6 +++---
 newlib/libm/math/w_fmod.c  |  8 
 newlib/libm/mathfp/s_cosh.c|  6 +++---
 newlib/libm/mathfp/s_fmod.c|  8 
 10 files changed, 51 insertions(+), 38 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 547474a..487b1d3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2015-11-02  Jon Turney  
+
+   * libc/stdio/fseek.c: Add missing semicolons to prototypes in
+   SYNOPSIS.
+   * libc/stdio/fwide.c: Ditto.
+   * libc/stdio64/fseeko64.c: Ditto.
+   * libc/string/strtok.c: Ditto.
+   * libc/string/wcstok.c: Ditto.
+   * libm/math/w_cosh.c: Ditto.
+   * libm/math/w_fmod.c:  Ditto.
+   * libm/mathfp/s_cosh.c: Ditto.
+   * libm/mathfp/s_fmod.c: Ditto.
+
 2015-09-22  Mike Frysinger  
 
* config.guess: Update from config repo.
diff --git a/newlib/libc/stdio/fseek.c b/newlib/libc/stdio/fseek.c
index 34147fa..b8fc36a 100644
--- a/newlib/libc/stdio/fseek.c
+++ b/newlib/libc/stdio/fseek.c
@@ -30,32 +30,32 @@ INDEX
 
 ANSI_SYNOPSIS
#include 
-   int fseek(FILE *<[fp]>, long <[offset]>, int <[whence]>)
-   int fseeko(FILE *<[fp]>, off_t <[offset]>, int <[whence]>)
+   int fseek(FILE *<[fp]>, long <[offset]>, int <[whence]>);
+   int fseeko(FILE *<[fp]>, off_t <[offset]>, int <[whence]>);
int _fseek_r(struct _reent *<[ptr]>, FILE *<[fp]>,
-long <[offset]>, int <[whence]>)
+long <[offset]>, int <[whence]>);
int _fseeko_r(struct _reent *<[ptr]>, FILE *<[fp]>,
-off_t <[offset]>, int <[whence]>)
+off_t <[offset]>, int <[whence]>);
 
 TRAD_SYNOPSIS
#include 
-   int fseek(<[fp]>, <[offset]>, <[whence]>)
+   int fseek(<[fp]>, <[offset]>, <[whence]>);
FILE *<[fp]>;
long <[offset]>;
int <[whence]>;
 
-   int fseeko(<[fp]>, <[offset]>, <[whence]>)
+   int fseeko(<[fp]>, <[offset]>, <[whence]>);
FILE *<[fp]>;
off_t <[offset]>;
int <[whence]>;
 
-   int _fseek_r(<[ptr]>, <[fp]>, <[offset]>, <[whence]>)
+   int _fseek_r(<[ptr]>, <[fp]>, <[offset]>, <[whence]>);
struct _reent *<[ptr]>;
FILE *<[fp]>;
long <[offset]>;
int <[whence]>;
 
-   int _fseeko_r(<[ptr]>, <[fp]>, <[offset]>, <[whence]>)
+   int _fseeko_r(<[ptr]>, <[fp]>, <[offset]>, <[whence]>);
struct _reent *<[ptr]>;
FILE *<[fp]>;
off_t <[offset]>;
diff --git a/newlib/libc/stdio/fwide.c b/newlib/libc/stdio/fwide.c
index a060d8f..b2aaf8a 100644
--- a/newlib/libc/stdio/fwide.c
+++ b/newlib/libc/stdio/fwide.c
@@ -9,17 +9,17 @@ INDEX
 
 ANSI_SYNOPSIS
#include 
-   int fwide(FILE *<[fp]>, int <[mode]>)
+   int fwide(FILE *<[fp]>, int <[mode]>);
 
-   int _fwide_r(struct _reent *<[ptr]>, FILE *<[fp]>, int <[mode]>)
+   int _fwide_r(struct _reent *<[ptr]>, FILE *<[fp]>, int <[mode]>);
 
 TRAD_SYNOPSIS
#include 
-   int fwide(<[fp]>, <[mode]>)
+   int fwide(<[fp]>, <[mode]>);
FILE *<[fp]>;
int <[mode]>;
 
-   int _fwide_r(<[ptr]>, <[fp]>, <[mode]>)
+   int _fwide_r(<[ptr]>, <[fp]>, <[mode]>);
struct _reent *<[ptr]>;
FILE *<[fp]>;
int <[mode]>;
diff --git a/newlib/libc/stdio64/fseeko64.c b/newlib/libc/stdio64/fseeko64.c
index d605dd0..34eee67 100644
--- a/newlib/libc/stdio64/fseeko64.c
+++ b/newlib/libc/stdio64/fseeko64.c
@@ -26,18 +26,18 @@ INDEX
 
 ANSI_SYNOPSIS
#include 
-   int fseeko64(FILE *<[fp]>, _off64_t <[offset]>, int <[whence]>)
+   int fseeko64(FILE *<[fp]>, _off64_t <[offset]>, int <[whence]>);
int _fseeko64_r (struct _reent *<[ptr]>, FILE *<[fp]>,
- _off64_t <[offset]>, int <[whence]>)
+ _off64_t <[offset]>, int <[whence]>);
 TRAD_SYNOPSIS
#include 
 
-   int 

Re: Using cp converts windows junctions to a cywin symlink; a security-config override

2015-11-02 Thread Andrey Repin
Greetings, Linda Walsh!

>> > I was copying a directory of files, some of which were windows junctions.
>> > These got converted to a cygwin symlink.  Although I am impressed that 
>> > there
>> > are such a thing for those OSs/drives that do not support such things, for 
>> > those
>> > that do, I think it would be good to keep the copy a junction.  Otherwise,
>> > things can get messy.

>> > Can this be corrected?
> ---

> (BTW -- you do know about the 'winsymlinks:native' setting in the
> CYGWIN environment variable?  It might be of some use.)

> Andrey wrote:
>> Unfortunately, even on systems, that do support symlinks functionality,
>> it is restricted by UAC and not easily unlocked.
> --- 
> Actually that's control by Windows group policy.

Yes, I know. But when UAC is enabled, it overriding this policy setting.
That's why I said that you need either admin console, or UAC turned off.

> It's alot like whether not 'users' can control 'mounts' on linux.
> It can be allowed, but doing so categorically might not be considered
> wise.

Microsoft does not follow common logic.

>> You'd need an admin shell or a user profile with UAC turned off and
>> permissions correctly configured to exploit native symlinks.
> --- 
> Or the system administrator would have to enable user-control of local
> symlinks.

...

> On my windows machine, unprivileged users are able to create all 4 types
> of symbolic links.

Do you have UAC enabled?

>> And Cygwin does not support creation of directory junctions to the best
>> of my knowledge. :(
> ---
> Neither does linux support creation of user-controlled mounts.

However, Windows allows creation of directory junctions just fine.
But blocks Symlinks.


-- 
With best regards,
Andrey Repin
Tuesday, November 3, 2015 02:34:22

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



[ITP] fzf 0.10.8

2015-11-02 Thread Adam Dinwoodie
Folks,

I'm looking at packaging fzf[0], which is a "fuzzy finder" with shell
and Vim integration.  It's not nearly so fast on Cygwin as it is on my
Linux and Mac boxes, sadly (I suspect a combination of it needing to
fall back to Ruby due to Cygwin's lack of Go compiler, plus the standard
Cygwin overheads), but it's still pretty fast, and I've been using it
myself on Cygwin for a couple of weeks, and on my CentOS box for a fair
bit longer.

The upstream package has an MIT license and is already included by Arch
Linux[1].  The main setup.hint is below, and it's ready to upload as
soon as it's declared GTG; I've uploaded the entire package tree[2] and
Cygport packaging code[3] for reference, too.

[0]: https://github.com/junegunn/fzf
[1]: https://aur.archlinux.org/packages/fzf/
[2]: https://tastycake.net/~adam/cygwin/fzf/
[3]: https://github.com/me-and/Cygwin-fzf/

Adam

category: Shells
requires: ruby ruby-curses 
sdesc: "Command line fuzzy finder"
ldesc: "fzf is a general-purpose command-line fuzzy finder"


[newlib-cygwin] Add support for Parallels Desktop FS (prlfs)

2015-11-02 Thread Corinna Vinschen
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=df6206aa56a3ef34f8444fee7c777593eddedbbe

commit df6206aa56a3ef34f8444fee7c777593eddedbbe
Author: Corinna Vinschen 
Date:   Mon Nov 2 12:08:25 2015 +0100

Add support for Parallels Desktop FS (prlfs)

* mount.h (enum fs_info_type): Add prlfs (Parallels Desktop FS).
(class fs_info): Add has_broken_fnoi flag.  Implement prlfs FS flag.
* mount.cc (fs_info::update): Handle PrlFS.  Fill new has_broken_fnoi
flag with life.
(fs_names): Add prlfs.
* globals.cc (ro_u_prlfs): Define.
* path.h (path_conv::has_broken_fnoi): New method.
* path.cc (symlink_info::check): Call file_get_fnoi utilizing new
has_broken_fnoi filesystem flag.
* fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Ditto.

* new-features.xml (ov-new2.3): Document Parallels Desktop FS support.

Signed-off-by: Corinna Vinschen 

Diff:
---
 winsup/cygwin/ChangeLog | 13 +
 winsup/cygwin/fhandler_disk_file.cc |  2 +-
 winsup/cygwin/globals.cc|  1 +
 winsup/cygwin/mount.cc  | 10 --
 winsup/cygwin/mount.h   |  6 +-
 winsup/cygwin/path.cc   |  3 ++-
 winsup/cygwin/path.h|  1 +
 winsup/cygwin/release/2.3.0 |  2 ++
 winsup/doc/ChangeLog|  4 
 winsup/doc/new-features.xml |  4 
 10 files changed, 41 insertions(+), 5 deletions(-)

diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index e46ffef..9dfa1b3 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,16 @@
+2015-11-02  Corinna Vinschen  
+
+   * mount.h (enum fs_info_type): Add prlfs (Parallels Desktop FS).
+   (class fs_info): Add has_broken_fnoi flag.  Implement prlfs FS flag.
+   * mount.cc (fs_info::update): Handle PrlFS.  Fill new has_broken_fnoi
+   flag with life.
+   (fs_names): Add prlfs.
+   * globals.cc (ro_u_prlfs): Define.
+   * path.h (path_conv::has_broken_fnoi): New method.
+   * path.cc (symlink_info::check): Call file_get_fnoi utilizing new
+   has_broken_fnoi filesystem flag.
+   * fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Ditto.
+
 2015-10-30  Corinna Vinschen  
 
* nlsfuncs.cc (__get_lcid_from_locale): Handle LocaleNameToLCID
diff --git a/winsup/cygwin/fhandler_disk_file.cc 
b/winsup/cygwin/fhandler_disk_file.cc
index 455c478..c38ba02 100644
--- a/winsup/cygwin/fhandler_disk_file.cc
+++ b/winsup/cygwin/fhandler_disk_file.cc
@@ -416,7 +416,7 @@ fhandler_base::fstat_by_handle (struct stat *buf)
  on the information stored in pc.fnoi.  So we overwrite them here. */
   if (get_io_handle ())
 {
-  status = file_get_fnoi (h, pc.fs_is_netapp (), pc.fnoi ());
+  status = file_get_fnoi (h, pc.has_broken_fnoi (), pc.fnoi ());
   if (!NT_SUCCESS (status))
{
 debug_printf ("%y = NtQueryInformationFile(%S, "
diff --git a/winsup/cygwin/globals.cc b/winsup/cygwin/globals.cc
index 09c08f2..7a17376 100644
--- a/winsup/cygwin/globals.cc
+++ b/winsup/cygwin/globals.cc
@@ -138,6 +138,7 @@ extern "C" {
   extern UNICODE_STRING _RDATA ro_u_mvfs = _ROU (L"MVFS");
   extern UNICODE_STRING _RDATA ro_u_nfs = _ROU (L"NFS");
   extern UNICODE_STRING _RDATA ro_u_ntfs = _ROU (L"NTFS");
+  extern UNICODE_STRING _RDATA ro_u_prlfs = _ROU (L"PrlSF"); /* No typo! */
   extern UNICODE_STRING _RDATA ro_u_refs = _ROU (L"ReFS");
   extern UNICODE_STRING _RDATA ro_u_sunwnfs = _ROU (L"SUNWNFS");
   extern UNICODE_STRING _RDATA ro_u_udf = _ROU (L"UDF");
diff --git a/winsup/cygwin/mount.cc b/winsup/cygwin/mount.cc
index 6cf3ddf..01f1759 100644
--- a/winsup/cygwin/mount.cc
+++ b/winsup/cygwin/mount.cc
@@ -1,7 +1,7 @@
 /* mount.cc: mount handling.
 
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-   2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Red Hat, Inc.
+   2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Red Hat, Inc.
 
 This file is part of Cygwin.
 
@@ -370,7 +370,8 @@ fs_info::update (PUNICODE_STRING upath, HANDLE in_vol)
  && !is_unixfs (RtlEqualUnicodeString (, _u_unixfs, FALSE))
  /* AFSRDRFsd == Andrew File System.  Doesn't support DOS attributes.
 Only native symlinks are supported. */
- && !is_afs (RtlEqualUnicodeString (, _u_afs, FALSE)))
+ && !is_afs (RtlEqualUnicodeString (, _u_afs, FALSE))
+ && !is_prlfs (RtlEqualUnicodeString (, _u_prlfs, FALSE)))
{
  /* Known remote file system with buggy open calls.  Further
 explanation in fhandler.cc (fhandler_disk_file::open_fs). */
@@ -402,6 +403,10 @@ fs_info::update (PUNICODE_STRING upath, HANDLE in_vol)
 only support this if the filename is non-null and the handle is
 the handle to a directory. NcFsd IR10 

Re: Bug in collation functions?

2015-11-02 Thread Corinna Vinschen
On Oct 31 13:13, Ken Brown wrote:
> On 10/30/2015 10:07 AM, Ken Brown wrote:
> >Hi Corinna,
> >
> >On 10/30/2015 8:03 AM, Corinna Vinschen wrote:
> >>On Oct 29 18:21, Ken Brown wrote:
> >>>The fallback I had in mind is to return the shorter string if they have
> >>>different lengths and otherwise to revert to wcscmp.
> > >
> >>I had a longer look into this suggestion and the below code and it took
> >>me some time to find out what bugged me with it:
> >>
> >>What about str/wcsxfrm?
> >>
> >>Per POSIX, calling strcmp on the result of strxfrm is equivalent to
> >>calling strcoll (analogue with wcs*).  If you extend *coll to perform an
> >>extra check on the length, you will have cases in which the above rule
> >>fails.  You can't perform the length test on the result of *xfrm and
> >>expect the same result as in *coll.
> >>
> >>In fact, when calling LCMapStringW with NORM_IGNORESYMOLS (you would
> >>have to do this anyway if we add this flag in *coll), the resulting
> >>transformed strings created from the input strings "11" and "1.1" would
> >>be identical, so a length test on the xfrm string is not meaningful at
> >>all.
> >>
> >>The bottom line is, afaics, we must make sure that CompareStringW and
> >>LCMapStringW are called the same way, and their result/output has to be
> >>returned to the caller.  Performing an extra check in *coll which can't
> >>be reliably performed in *xfrm is not feasible.
> >>
> >>Does that make sense?
> >
> >Yes, I see the problem, and I don't see a good way around it.  So I
> >think we probably have to leave things as they are and live with the
> >fact that we can't do comparisons that ignore whitespace and punctuation.
> >
> >The alternative of allowing str/wcscoll to return 0 on unequal strings
> >doesn't seem feasible in view of Eric's comments.
> 
> I have one other idea.  What would you think of defining a function
> cygwin_strcoll that's like strcoll but with an extra bool parameter
> 'ignoresymbols'?  If ignoresymbols = false, this would be the same as
> strcoll.  If ignoresymbols = true, this would use NORM_IGNORESYMBOLS with
> the fallback I suggested.
> 
> That way applications that prefer to be more glibc-compatible and don't need
> strxfrm could do something like
> 
>   #define strcoll(A,B) cygwin_strcoll ((A), (B), true)
> 
> If you think this is reasonable, I'll submit a patch.  If not, no problem.

No, I don't think this is feasible.  Given Eric's comments, can an
application ever expect that strcoll behaves exactly as on Linux?  For
portability reasons, it has to expect different results on different
platforms.  Only if the result is POSIXly incorrect, it makes sense to
fix the behaviour, IMHO.


Corinna

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


pgpXbwJhLF_MI.pgp
Description: PGP signature


Re: TP_NUM_C_BUFS too small

2015-11-02 Thread Corinna Vinschen
On Nov  2 02:32, Mark Geisert wrote:
> Helmut Karlowski writes:
> > Am 01.11.2015, 18:46 Uhr, schrieb Helmut Karlowski:
> > > Hello
> > >
> > > just had a program crashing with this error:
> > >
> > >   2 [main] ue 3180 C:\bin\ue.exe: *** fatal error - Internal error:  
> > > TP_NUM_C_BUFS too small: 50
> > >
> > > What could that mean?
> > 
> > It means my program had a bug - fixed now.
> 
> Glad it's fixed!  For the record, could you say what sort of bug would cause
> a fatal internal error like that?
> Just curious,

Me too.  Sounds like some kind of recursion.


Corinna

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


pgpk80CaCON0w.pgp
Description: PGP signature


Re: fstat st_size on open files on Parallels filesystem is wrong

2015-11-02 Thread Corinna Vinschen
On Nov  2 04:38, Jonathan Lennox wrote:
> On Wednesday, October 21 2015, "Corinna Vinschen" wrote to 
> "cygwin@cygwin.com" saying:
> > On Oct  8 12:16, Jonathan Lennox wrote:
> > > No such luck, despite two major version revisions of Parallels Desktop 
> > > (I'm
> > > now on version 11.0.2) and moving to Windows 10 as the guest OS -- the bug
> > > perists, unchanged.  So it looks like Cygwin will need to add a workaround
> > > for this filesystem to fix the problem.
> > 
> > Ok, we could do that.  Can you compile and run the testcase from
> > https://cygwin.com/ml/cygwin/2014-04/msg00523.html again?  Does it
> > still show 0 vs. 12 bytes?  Dumb extra test: Does the output change
> > if you reorder the calls, requesting FileStandardInformation first,
> > FileNetworkOpenInformation second?
> 
> I re-ran the test, no change. Changing the order gives the same result --
> FileStandardInformation works, FileNetworkOpenInformation doesn't.

Ok, so it's not about some caching.

> > Just create a hardlink on that drive using native means:
> > 
> >   $ touch foo
> >   $ cmd /c mklink /h bar foo
> > 
> > Error at this point?  No hardlinks.  Otherwise:
> 
> "You do not have sufficient privilege to perform this operation."  Is that
> sufficient proof?

No.

> Unfortunately, when I do "Run As Administrator" on MinTTY, the Mac drives
> (/cygdrive/z and /cygdrive/y) don't show up. I don't know why that is.  So I
> can't test hard links as administrator.

That's a security feature of UAC.  You can change that in the registry.
As administrator:

  regtool -d set 
/HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Policies/System/EnableLinkedConnections
 1

Then reboot.

> >   $ ls -li foo bar
> > 
> > Are the inode numbers identical?  Congrats, hardlinks work.  But given
> > the general FAT-iness of the getVolInfo output, I guess it doesn't
> > maintain hardlinks.
> 
> However, when I create a hardlink on the underlying (Mac) file system, the
> inode numbers that Cygwin shows are not identical.  So "no hardlinks" seems
> very likely.

Given the filesystem flags, Cygwin treats your FS as some kind of FAT
anyway, so this isn't convincing.  I doubt they work anyway, but if you
really want to test it, use your orignal testcase and replace the
NtQueryInformationFile like this:

  FILE_INTERNAL_INFORMATION fii;
  status = NtQueryInformationFile (h, , , sizeof fii,
   FileInternalInformation);
  if (!NT_SUCCESS (status))
fprintf (stderr, "NtQueryInformationFile: 0x%08x\n", status);
  else
printf ("inode number %llu\n", fii.FileId.QuadPart);

Then call this application multiple times on some well known hardlinks
to the same file.  If they have the same number, all the time, hardlinks
work.

I added support for this filesystem (called prlfs in mount output) and
without hardlink support for now.  I uploaded a new developer snapshot
to https://cygwin.com/snapshots/ Please give it a try.


Thanks,
Corinna

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


pgpEsjMhEKvUb.pgp
Description: PGP signature


Re: Mounting a network share

2015-11-02 Thread Corinna Vinschen
On Nov  1 23:35, Mike Brown wrote:
> On Mon, Nov 02, 2015 at 04:40:33AM +0300, Andrey Repin wrote:
> > net use //host/resource[/path] P: * /PERSISTENT /SAVECRED
> 
> I got the following to be accepted:
> 
> net use \\192.168.1.40\Public password /user:brown /persistant:yes
> 
> The syntax doesn't have a place to where it should be mounted.
> 
> But, if it mounted, I have no idea where. A "df -k" only shows the local 
> drives.
> 
> > This is not a Cygwin question.
> > If you want to do it from Cygwin side, use fstab and don't use /cygdrive
> > prefix. It is for automatic mounts ONLY.
> 
> I can't find a fstab.

https://cygwin.com/cygwin-ug-net/using.html#using-pathnames


Corinna

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


pgpv0Ob49h8IJ.pgp
Description: PGP signature


Re: Help: cygheap base mismatch detected

2015-11-02 Thread Corinna Vinschen
On Nov  1 17:22, Jim Reisert AD1C wrote:
> I installed the latest Windows 10 update this morning and rebooted.
> Now Cygwin won't work at all.  Using the latest test release of
> Cygwin:
> 
> CYGWIN_NT-10.0-WOW JJR 2.3.0(0.291/5/3) 2015-10-22 17:54 i686 Cygwin
> 
> Any ideas?
> 
> F:\>dash
> $  rebase-trigger fullrebase
>   0 [main] dash (4564) C:\Cygwin\bin\dash.exe: *** fatal error -
> cygheap base mismatch detected - 0xABB400/0xD1B400.

*Both* addresses are wrong.  The 32 bit Cygwin DLL has to be loaded to
address 0x6100 (as noted in the file header) which, if done correctly,
results in a cygheap address > 0x6100.  The cygheap is part of the
DLL binary, so it's loaded with it.  In Cygwin 2.2.1, the address should
be in the 0x612fc000 range.

It seems a Windows DLL or a virus scanner DLL gets loaded to this
address for some reason.  I'm a bit at a loss to make a suggestion here,
except for switching to 64 bit Cygwin which has much less problems with
this due to the huge address space.


Corinna

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


pgpG1ZCRaicYb.pgp
Description: PGP signature


Re: Help: cygheap base mismatch detected

2015-11-02 Thread Jim Reisert AD1C
On Mon, Nov 2, 2015 at 4:31 AM, Corinna Vinschen wrote:

> It seems a Windows DLL or a virus scanner DLL gets loaded to this
> address for some reason.  I'm a bit at a loss to make a suggestion here,
> except for switching to 64 bit Cygwin which has much less problems with
> this due to the huge address space.

I meant to reply to this earlier today, but lines between day/night
and work/not have been too blurry lately.

I tried a clean install of 32-bit Cygwin, but that didn't fix
anything.  So then on a lark, I rebooted the computer (turned it off
actually, which I have not done in weeks), and magically, the problem
went away.  Maybe Windows 10 had its knickers in a twist or something,
but everything else seemed to run just fine, except Cygwin.

I have tried 64-bit Cygwin in the past.  I do a lot of file I/O and
sorting/searching on largish test-based data sets, and 64-bit was
noticeably slower than 32-bit Cygwin, so I have not been gung-ho to
switch.  Maybe now that it's more mature, I should give it another
shot.

-- 
Jim Reisert AD1C, , http://www.ad1c.us

--
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: fstat st_size on open files on Parallels filesystem is wrong

2015-11-02 Thread Corinna Vinschen
On Nov  2 08:08, Jonathan Lennox wrote:
> On Monday, November 2 2015, "Corinna Vinschen" wrote to "cygwin@cygwin.com" 
> saying:
> 
> > On Nov  2 04:38, Jonathan Lennox wrote:
> > > Unfortunately, when I do "Run As Administrator" on MinTTY, the Mac drives
> > > (/cygdrive/z and /cygdrive/y) don't show up. I don't know why that is.  
> > > So I
> > > can't test hard links as administrator.
> > 
> > That's a security feature of UAC.  You can change that in the registry.
> > As administrator:
> > 
> >   regtool -d set 
> > /HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Policies/System/EnableLinkedConnections
> >  1
> > 
> > Then reboot.
> 
> Didn't work:
> 
> $ ls /cygdrive/
> c  d  e
> 
> $ regtool get 
> /HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Policies/System/EnableLinkedConnections
> 
 ^^^?

That should print "1"

EnableLinkedConnections is a DWORD value and should be set to 1.

> $ uname -a
> CYGWIN_NT-10.0 Vidyo-LT0519-10 2.3.0(0.291/5/3) 2015-11-02 11:15 x86_64 Cygwin
> 
> Is Windows 10 the same?

Yes.  Works for me.

> > I added support for this filesystem (called prlfs in mount output) and
> > without hardlink support for now.  I uploaded a new developer snapshot
> > to https://cygwin.com/snapshots/ Please give it a try.
> 
> No, still seeing the failure in the snapshot:
> 
> $ ./stat-size-test.exe /cygdrive/y/foo ~/foo
> /cygdrive/y/foo: fstat: st_size=0
> /cygdrive/y/foo: stat: st_size=12
> /home/jonathan/foo: fstat: st_size=12
> /home/jonathan/foo: stat: st_size=12

Weird.  There should be no FileNetworkOpenInformation call anymore for
Netapp and the PrlSF filesystem.

Does Cygwin correctly recognize the FS?  What does `mount' print?  It
should print `type prlfs'.

Can you please once again call `/usr/lib/csih/getVolInfo.exe Z:' and
`/usr/lib/csih/getVolInfo.exe Y:' and paste the output here?  I'm not
quite sure because the original getVolInfo call returned a filesystem
type of "PrlSF", not "PrlFS" as I had expected.  Cygwin now checks for
"PrlSF".


Corinna

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


pgp08kmGbFY5F.pgp
Description: PGP signature


Re: fstat st_size on open files on Parallels filesystem is wrong

2015-11-02 Thread cyg Simple
On 11/2/2015 4:38 AM, Jonathan Lennox wrote:
> 
> Unfortunately, when I do "Run As Administrator" on MinTTY, the Mac drives
> (/cygdrive/z and /cygdrive/y) don't show up. I don't know why that is.  So I
> can't test hard links as administrator.
> 

This is due to "Run As Administrator" is a different user with a
different environment.  You would need to recreate the mapped drives.

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



Re: compile ncurses "hello world" to run independent of cygwin?

2015-11-02 Thread cyg Simple
On 11/1/2015 10:04 PM, Daniel Goldman wrote:
> 
> $ gcc ncurses-1.c -lncurses
> 
> $ ./a.exe # runs perfectly under cygwin
> 

A Cygwin build using the Cygwin runtime should work.

> $ i686-pc-mingw32-gcc -I /usr/include ncurses-1.c -L /lib -lncurses
> 
> $ ./a.exe
> Segmentation fault
> 

A MinGW build using the Cygwin runtime should *never* work.

> 
> What am I doing wrong? How do I use cygwin to compile the test ncurses
> program so it can run in a dos terminal, independent of cygwin? I looked
> around the docs and archives and could not figure out.
> 

You need to specify include and lib paths that contain MinGW libraries.
 Don't use the Cygwin native paths of /usr/include and /lib.  This means
that you need a ncurses library that is built with MinGW.

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



Re: compile ncurses "hello world" to run independent of cygwin?

2015-11-02 Thread cyg Simple
On 11/1/2015 11:09 PM, Darik Horn wrote:
> 
> Unless there is a specific reason to cross through Cygwin, it could be
> easier to use the native MinGW environment directly:
> 
> * http://www.mingw.org/wiki/Getting_Started
> 

Poppycock! There is no reason that the user couldn't use Cygwin as the
one and only system to build native binaries.

> And link against the ncurses redistributable:
> 
> * http://invisible-mirror.net/ncurses/ncurses.html
> 

Building your own native library with a known set of compilers and
options may be better than depending on someone's build where you don't
know for certain the system, options and compiler used.

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