Re: Bug in fork() while in a thread

2010-08-16 Thread Corinna Vinschen
On Aug 15 14:53, Christopher Faylor wrote:
> On Sun, Aug 15, 2010 at 07:42:01PM +0200, Jason Curl wrote:
> >Is it allowed to issue the fork() system call while not in the main 
> >thread? When I read the OpenGroup specifications I don't seem to find 
> >anything against allowing this.
> >
> >In particular, if I create a thread, then issue a fork(), data that 
> >exists on the stack is corrupted after the fork() is in the child. Using 
> >data on the heap doesn't show any issues (and is currently my 
> >workaround, in case this is a bug).
> 
> If I'm reading this correctly then "the stack" in this case is the stack
> associated with the main thread.  Cygwin only duplicates the stack in
> the executing thread.  In your example, env (or presumably env2) from
> the main thread is passed to another thread which then calls fork.  In
> that scenario, the forked process is going to see garbage in env since
> the array has never been initialized.
> 
> It is theoretically possible to duplicate the stack of the main thread
> and other threads in the forked process [...]

I guess I'm missing something here.  Here's an excerpt from the SUSv4
fork man page:

  The fork() function shall create a new process. The new process (child
  process) shall be an exact copy of the calling process (parent process)
  except as detailed below:

  [...]

  o A process shall be created with a single thread. If a
multi-threaded process calls fork(), the new process shall contain
a replica of the calling thread and its entire address space,
possibly including the states of mutexes and other resources.
[...]

Is the stack of another thread, which is not executed in the forked
process anymore, a part of the calling's thread "entire address space"?


Corinna

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

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



Re: extending a VS python with cygwin

2010-08-16 Thread Jason Tishler
Tom,

On Tue, Aug 10, 2010 at 11:11:21AM -0400, Tom Roche wrote:
> I tried to take the advice offered, but fail:
> 
> m...@cygwinbox ~/bin/duplicity-0.6.09$ python -c mingw32 setup.py install
> [snip]
>
> What's the appropriate syntax here? Or how else should I fix this
> build problem?

Searching the web, I found the following:

python setup.py build --compiler=mingw32 install

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6

--
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: Bug in fork() while in a thread

2010-08-16 Thread Christopher Faylor
On Mon, Aug 16, 2010 at 11:05:52AM +0200, Corinna Vinschen wrote:
>On Aug 15 14:53, Christopher Faylor wrote:
>> On Sun, Aug 15, 2010 at 07:42:01PM +0200, Jason Curl wrote:
>> >Is it allowed to issue the fork() system call while not in the main 
>> >thread? When I read the OpenGroup specifications I don't seem to find 
>> >anything against allowing this.
>> >
>> >In particular, if I create a thread, then issue a fork(), data that 
>> >exists on the stack is corrupted after the fork() is in the child. Using 
>> >data on the heap doesn't show any issues (and is currently my 
>> >workaround, in case this is a bug).
>> 
>> If I'm reading this correctly then "the stack" in this case is the stack
>> associated with the main thread.  Cygwin only duplicates the stack in
>> the executing thread.  In your example, env (or presumably env2) from
>> the main thread is passed to another thread which then calls fork.  In
>> that scenario, the forked process is going to see garbage in env since
>> the array has never been initialized.
>> 
>> It is theoretically possible to duplicate the stack of the main thread
>> and other threads in the forked process [...]
>
>I guess I'm missing something here.  Here's an excerpt from the SUSv4
>fork man page:
>
>  The fork() function shall create a new process. The new process (child
>  process) shall be an exact copy of the calling process (parent process)
>  except as detailed below:
>
>  [...]
>
>  o A process shall be created with a single thread. If a
>multi-threaded process calls fork(), the new process shall contain
>a replica of the calling thread and its entire address space,
>possibly including the states of mutexes and other resources.
>[...]
>
>Is the stack of another thread, which is not executed in the forked
>process anymore, a part of the calling's thread "entire address space"?

I saw that too but I can confirm that linux duplicates the main thread.
That isn't too surprising since it probably just replicates the entire
address space of the process including all of the stacks of all of the
threads.

Cygwin is more "efficient" than that.

cgf

--
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: UTF-8 breaks 'ascii'

2010-08-16 Thread Charles Wilson
On 4/14/2010 11:45 AM, Charles Wilson wrote:
> Kenneth wrote:
>> Maybe it shouldn't attempt to display code points 128..255
>> since they aren't really ascii.
> 
> You're probably right.  Originally, ascii didn't display those code
> points; I added it back when a big concern was getting the "correct"
> fonts for rxvt-windows and cmd.exe so that line graphics (pstree -G,
> etc) would display properly.  It was a quick way to tell that "yes,
> those line art characters are present at the appropriate char values".

Andy Koppe wrote:
> I still find it useful for much the same reason, when testing the
> plethora of supported charsets. How about disabling the extended code
> points by default and having an option for enabling them?

Done, for 1.4.6: I added a new option '--extended'.

--
Chuck



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



make not working in cygwin when trying to install a framework!

2010-08-16 Thread Mahesh P
hi!

1)I unzipped the CUnit test framework from the bash shell in cygwin
and tried installing it

./configure-works
make command gives me an error saying
cd . && autoheader
/bin/sh : autoheader:command not found
make:*** [config.h.in]Error 127.
make install works
make clean works

I am not able to compile the program
--

-- 
Thank You and Have a Good Day
      Mahesh
+919448558374

--
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: cygstart version 1.4 bug in "cygstart --reference"

2010-08-16 Thread Charles Wilson
On 6/11/2008 8:14 PM, SJ Kissane wrote:
> In cygstart 1.4, "cygstart --reference" opens a web browser to
> http://msdn.microsoft.com/library/en-us/shellcc/platform/Shell/reference/functions/shellexecute.asp
> 
> which microsoft redirects to:
> 
> http://msdn.microsoft.com/en-us/ms123402.aspx
> 
> which now 404s.
> 
> Now, from one perspective is Microsoft's fault for breaking their URLs.
> But should we rely on Microsoft not to break their website?
> Maybe that's expecting a bit too much from life :)
> 
> And this bug could be fixed, by changing the URL in the code to one
> that now works,
> http://msdn.microsoft.com/en-us/library/bb762153(VS.85).aspx
> 
> But really, shouldn't this feature just be removed?
> What is the justification for hardcoding Microsoft URLs in source code,
> given that it creates a bug every time Microsoft reorganizes their website.

It's a sort of "self-test", since it is implemented by calling the
internal cygStart() function.  I've changed the URL, but left the
--reference option in place.

--
Chuck

--
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: Broken process substitution

2010-08-16 Thread Daniel Colascione
On Sat, Aug 14, 2010 at 4:17 AM, Corinna Vinschen
 wrote:
> Yep, it was another problem.  At one point the code missed to copy
> over information about a file descriptor.  I applied a fix to CVS.

I'm running a DLL built from the latest CVS, and all is well. Thanks
for the fix!

--
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: make not working in cygwin when trying to install a framework!

2010-08-16 Thread Larry Hall (Cygwin)

On 8/16/2010 12:47 PM, Mahesh P wrote:

hi!

1)I unzipped the CUnit test framework from the bash shell in cygwin
and tried installing it

./configure-works
make command gives me an error saying
cd .&&  autoheader
/bin/sh : autoheader:command not found
make:*** [config.h.in]Error 127.
make install works
make clean works

I am not able to compile the program




Looks like it wants autoconf.

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

_

A: Yes.

Q: Are you sure?

A: Because it reverses the logical flow of conversation.

Q: Why is top posting annoying in email?


--
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: Where's my home? (lost in my domain)

2010-08-16 Thread Linda Walsh

Larry Hall (Cygwin) wrote:

On 8/4/2010 4:22 AM, Linda Walsh wrote:

When I log in, I seem to be placed in "/Users/law.Bliss".

IF I type "cd" and hit return, then I'm in "//Bliss/law".

In other words, the value of HOME is


[My home vars:]
HOME='//Bliss/law'
HOMEPATH='\'HOMEDRIVE='i'   HOMESHARE='\\BLISS\law'

My /etc/password for user "Bliss\law" (why "\" and not "/"?)
has "//Bliss/law".


Ask Microsoft.  It's their convention.

=== (side question)
 Cygwin doesn't generally follow Microsoft conventions for pathnames.  
 It substitutes forward-slash for backslash.  Since my

 user ID is a path of the form [SEP], out of
 idle curiosity, I wondered why foward slash wasn't also used
 in user pathnames as it was for file pathnames.  Not really 
 my central question, 
but I completely missed emphasizing it, so let me retry:


Wwhen I start a cygwin window (what I lazily called
'logged in'), I am placed in "/Users/law.Bliss" (on drive C).

Nothing in my home variables or /etc/passwd file mentions
/Users/law.Bliss.  I.e. when I press "cd" and hit return, it
uses the value of HOME (as properly derived via step 2 as
mentioned in /etc/profile) to place me in "//Bliss/law".

So why am I   *starting out*  in /Users/law.Bliss when it
isn't mentioned anywhere?


Linda

 (That was my main question. Sometimes, in describing a problem, 
 I ask too many side questions and forget to emphasize the actual 
 question I was writing about...at least it was my 1st line!  
 *sigh*)




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



gcc-4.5 notes

2010-08-16 Thread Yaakov (Cygwin/X)
Dave,

Several notes about gcc-4.5.0:

1) I'm using a new FIONREAD patch for Classpath which solves several
issues.  Matching patch for gcc-4.5 attached.

2) fix-libtool-scripts-for-latest-gcc-runtimes.sh doesn't actually do
anything; 's|echo sed|sed|g' fixes that.

3) libgnat import libs are missing:

$ gnatmake hello.adb -bargs -shared
gcc -c hello.adb
gnatbind -shared -x hello.ali
gnatlink hello.ali -shared-libgcc
/usr/lib/gcc/i686-pc-cygwin/4.5.0/../../../../i686-pc-cygwin/bin/ld:
cannot find -lgnat-4.5
collect2: ld returned 1 exit status
gnatlink: error when calling /usr/bin/gcc.exe
gnatmake: *** link failed.

Looking at gcc/ada/gcc-interface/Makefile.in, it looks like there is
supposed to be a adalib/libgnat-4.5.dll.a symlink, but it's not quite
right.  Patch for 4.5.1 attached.

4) After creating said symlink, the resulting binary outputs "Hello,
world!" but does not exit, and requires kill -f to terminate.  The same
code linked statically (IOW w/o "-bargs -shared") runs and exits
correctly.

5) Several -4-suffixed programs have no unversioned alternatives; this
includes: aot-compile, gccbug, jcf-dump, rebuild-gcj-db.  (Of course, if
we drop gcc3, or at least its alternatives, then gcc4 can be
unversioned, making this point moot.)

6) Are the gcj tools working?  If not, perhaps they should just be
dropped until they get figured out.  An alternative would be for me to
ITP my Classpath-based stack.

7) jni.h and jni_md.h should probably be shipped with gcc4-java instead
of gcc4-core.

8) It would be helpful if gcc4-core would provide a libffi.pc pkg-config
file, since for us this is *the* libffi.

HTH,


Yaakov

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35536

--- origsrc/gcc-4.5.0/libjava/classpath/native/jni/java-nio/gnu_java_nio_VMChannel.c	2007-12-28 11:49:56.0 -0600
+++ src/gcc-4.5.0/libjava/classpath/native/jni/java-nio/gnu_java_nio_VMChannel.c	2010-05-11 03:55:47.789066200 -0500
@@ -1601,7 +1601,7 @@ Java_gnu_java_nio_VMChannel_available (J
   if (ioctl (fd, FIONREAD, &avail) == -1)
 {
 #if defined(ENOTTY) && defined(HAVE_FSTAT)
-  if (errno == ENOTTY)
+  if (errno == ENOTTY || errno == EINVAL)
 {
   if ((fstat (fd, &statBuffer) == 0) && S_ISREG (statBuffer.st_mode))
 {

--- origsrc/gcc-4.5.1/gcc/ada/gcc-interface/Makefile.in	2010-08-15 23:57:49.606350800 -0500
+++ src/gcc-4.5.1/gcc/ada/gcc-interface/Makefile.in	2010-08-16 13:50:46.168752400 -0500
@@ -2434,10 +2444,8 @@
 	   if [ -f $(RTSDIR)/$(LIBGNAT_SHARED_LIB_PREFIX)$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) ]; then \
 	  $(INSTALL) $(RTSDIR)/$(LIBGNAT_SHARED_LIB_PREFIX)$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) \
 			 $(DESTDIR)$(bindir); \
-	   fi; \
-	   if [ -f $(RTSDIR)/$(LIBGNAT_SHARED_LIB_PREFIX)$${file}$(soext) ]; then \
-	  $(LN_S) $(bindir)$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) \
-	  $(DESTDIR)$(ADA_RTL_OBJ_DIR)/lib$${file}$(soext); \
+	  $(LN_S) $(bindir)/$(LIBGNAT_SHARED_LIB_PREFIX)$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) \
+	  $(DESTDIR)$(ADA_RTL_OBJ_DIR)/lib$${file}$(hyphen)$(LIBRARY_VERSION).dll.a; \
 	   fi; \
 	done
 # This copy must be done preserving the date on the original file.
with Ada.Text_IO;
 
procedure Hello is
begin
   Ada.Text_IO.Put_Line ("Hello, world!");
end Hello;

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

Cygwin 1.7.5 segfault during setup

2010-08-16 Thread Steve Marotta
I am using Cygwin 1.7.5, upgraded from 1.5, or so I think. I am trying
to run setup.exe so I can install new packages. I select "Install from
Internet" and "Direct Connection", and my network connection itself
works fine. When setup tries to download the mirrors list, it says,
"This application has requested the Runtime to terminate it in an
unusual way."

I tried running it under gdb, but without debug symbols, it didn't do
much good. Here's the output:


Starting program: c:/Documents and Settings/smarotta.CRA/My
Documents/downloads/setup-1.7.5.exe
Loaded symbols for C:\WINDOWS\system32\ntdll.dll
Loaded symbols for C:\WINDOWS\system32\kernel32.dll
Loaded symbols for C:\WINDOWS\system32\advapi32.dll
Loaded symbols for C:\WINDOWS\system32\rpcrt4.dll
Loaded symbols for C:\WINDOWS\system32\secur32.dll
Loaded symbols for
C:\WINDOWS\WinSxS\X86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.5512_x-ww_35d4ce83\comctl32.dll
Loaded symbols for C:\WINDOWS\system32\msvcrt.dll
Loaded symbols for C:\WINDOWS\system32\gdi32.dll
Loaded symbols for C:\WINDOWS\system32\user32.dll
Loaded symbols for C:\WINDOWS\system32\shlwapi.dll
Loaded symbols for C:\WINDOWS\system32\ole32.dll
Loaded symbols for C:\WINDOWS\system32\shell32.dll
Loaded symbols for C:\WINDOWS\system32\wsock32.dll
Loaded symbols for C:\WINDOWS\system32\ws2_32.dll
Loaded symbols for C:\WINDOWS\system32\ws2help.dll
warning: LOG: 2 Starting cygwin install, version 2.697
warning: LOG: 2 io_stream_cygfile: fopen(/etc/setup/net-proxy-host)
failed 2 No such file or directory
warning: LOG: 2 io_stream_cygfile: fopen(/etc/setup/net-proxy-port)
failed 2 No such file or directory
warning: LOG: 2 io_stream_cygfile: fopen(/etc/setup/extrakeys) failed
2 No such file or directory
warning: LOG: 2 io_stream_cygfile:
fopen(/etc/setup/chooser_window_settings) failed 2 No such file or
directory
warning: LOG: 2 Current Directory: C:\Documents and Settings\smarotta\Home\temp
warning: LOG: 2 User has backup/restore rights
warning: LOG: 2 Changing gid to Administrators
warning: LOG: 2 Could not open service McShield for query, start and
stop. McAfee may not be installed, or we don't have access.
warning: LOG: 2 source: network install
warning: LOG: 2 root: C:\cygwin binary system
warning: LOG: 2 Selected local directory: C:\Documents and
Settings\smarotta\Home\temp
warning: LOG: 2 net: Direct
warning: LOG: 1 Loaded cached mirror list
warning: LOG: 1 get_url_to_membuf http://cygwin.com/mirrors.lst
warning: LOG: 1 getUrlToStream http://cygwin.com/mirrors.lst

Program exited with code 03.


Is there a problem with the cached mirrors list? Can I clear that
cache? Can it be the .NET framework I have installed on my machine? I
would appreciate any and all ideas anyone has on how to resolve this
issue, as I need to use Cygwin as soon as possible.

Thanks,
Steve

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



Re: Cygwin 1.7.5 segfault during setup

2010-08-16 Thread Steve Holden
On 8/16/2010 5:32 PM, Steve Marotta wrote:
> I am using Cygwin 1.7.5, upgraded from 1.5, or so I think. I am trying
> to run setup.exe so I can install new packages. I select "Install from
> Internet" and "Direct Connection", and my network connection itself
> works fine. When setup tries to download the mirrors list, it says,
> "This application has requested the Runtime to terminate it in an
> unusual way."
> 
> I tried running it under gdb, but without debug symbols, it didn't do
> much good. Here's the output:
> 
> 
> Starting program: c:/Documents and Settings/smarotta.CRA/My
> Documents/downloads/setup-1.7.5.exe
> Loaded symbols for C:\WINDOWS\system32\ntdll.dll
> Loaded symbols for C:\WINDOWS\system32\kernel32.dll
> Loaded symbols for C:\WINDOWS\system32\advapi32.dll
> Loaded symbols for C:\WINDOWS\system32\rpcrt4.dll
> Loaded symbols for C:\WINDOWS\system32\secur32.dll
> Loaded symbols for
> C:\WINDOWS\WinSxS\X86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.5512_x-ww_35d4ce83\comctl32.dll
> Loaded symbols for C:\WINDOWS\system32\msvcrt.dll
> Loaded symbols for C:\WINDOWS\system32\gdi32.dll
> Loaded symbols for C:\WINDOWS\system32\user32.dll
> Loaded symbols for C:\WINDOWS\system32\shlwapi.dll
> Loaded symbols for C:\WINDOWS\system32\ole32.dll
> Loaded symbols for C:\WINDOWS\system32\shell32.dll
> Loaded symbols for C:\WINDOWS\system32\wsock32.dll
> Loaded symbols for C:\WINDOWS\system32\ws2_32.dll
> Loaded symbols for C:\WINDOWS\system32\ws2help.dll
> warning: LOG: 2 Starting cygwin install, version 2.697
> warning: LOG: 2 io_stream_cygfile: fopen(/etc/setup/net-proxy-host)
> failed 2 No such file or directory
> warning: LOG: 2 io_stream_cygfile: fopen(/etc/setup/net-proxy-port)
> failed 2 No such file or directory
> warning: LOG: 2 io_stream_cygfile: fopen(/etc/setup/extrakeys) failed
> 2 No such file or directory
> warning: LOG: 2 io_stream_cygfile:
> fopen(/etc/setup/chooser_window_settings) failed 2 No such file or
> directory
> warning: LOG: 2 Current Directory: C:\Documents and 
> Settings\smarotta\Home\temp
> warning: LOG: 2 User has backup/restore rights
> warning: LOG: 2 Changing gid to Administrators
> warning: LOG: 2 Could not open service McShield for query, start and
> stop. McAfee may not be installed, or we don't have access.
> warning: LOG: 2 source: network install
> warning: LOG: 2 root: C:\cygwin binary system
> warning: LOG: 2 Selected local directory: C:\Documents and
> Settings\smarotta\Home\temp
> warning: LOG: 2 net: Direct
> warning: LOG: 1 Loaded cached mirror list
> warning: LOG: 1 get_url_to_membuf http://cygwin.com/mirrors.lst
> warning: LOG: 1 getUrlToStream http://cygwin.com/mirrors.lst
> 
> Program exited with code 03.
> 
> 
> Is there a problem with the cached mirrors list? Can I clear that
> cache? Can it be the .NET framework I have installed on my machine? I
> would appreciate any and all ideas anyone has on how to resolve this
> issue, as I need to use Cygwin as soon as possible.
> 
Your first line of attack should be to replace your current setup.exe
with a fresh copy downloaded from cygwin.com.

regards
 Steve
-- 
Steve Holden   +1 571 484 6266   +1 800 494 3119
DjangoCon US September 7-9, 2010http://djangocon.us/
See Python Video!   http://python.mirocommunity.org/
Holden Web LLC http://www.holdenweb.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



Existence check fails on Cygwin Perl

2010-08-16 Thread Andrew DeFaria
 This is strange. I usually tend to use Cygwin's Perl as it is more 
full featured and works well but there are times when I am forced to use 
"cqperl" - a Perl that comes with Rational Clearquest - at my clients. 
Here it seems that Cygwin's Perl utterly fails the test where as cqperl 
- a derivative of ActiveuuState - works.


This is using the existence check (-e) for a file. The file happens to 
be on a share thus we are using UNC notation. It doesn't even matter if 
"server" is a real server or not, nor whether the share and path exist. 
Use anything you like. In fact use "server" and "path" and "file". 
Either way Cygwin's Perl reports that the file exists even when it 
doesn't, or the path is wrong or even if the server does not exist!


$ cat test.pl'
use warnings;
use strict;

# Obviously non-existant server and file
my $file = "server\\path\\file";

# Check for existance returns true for Cygwin - false for ActiveState
if (-e $file) {
  print "true\n"
} else {
  print "false\n"
}
$ perl test.pl
true
$ cqperl test.pl
false
$



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



Postinstall for mintty fails when installing "just for me"

2010-08-16 Thread Buchbinder, Barry (NIH/NIAID) [E]
$ bash --norc --noprofile /etc/postinstall/mintty.sh
/bin/mkdir: cannot create directory `/c/Documents and Settings/All Users/Start 
Menu/Programs/Cygwin': Permission denied
mkshortcut: Saving "C:\Documents and Settings\All Users\Start 
Menu\Programs\Cygwin\mintty.lnk" failed; does the target directory exist?
/bin/chmod: cannot access `/c/Documents and Settings/All Users/Start 
Menu/Programs/Cygwin/mintty.lnk': No such file or directory
echo $?
1

Thanks,

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


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



Path conversion issue

2010-08-16 Thread Andrey Repin
Greetings, All!

Trying to find differences between local and remote file, I run into an issue:

diff.exe -cdb -x "CVS" -x ".svn" -I "\$Id.*\$" --strip-trailing-cr -- 
"C:\...\php-tools\GalleryClass.php" "\\REMOTE\C$\...\php-tools\GalleryClass.php"
diff: \REMOTE\C$\...\php-tools\GalleryClass.php: No such file or directory

Why it ate the leading backslash? Isn't it supposed to convert UNC path to
proper one? User's guide tell me this shouldn't be an issue, or so I read it
this way. Can anyone enlighten me on this matter, please?


-- 
WBR,
 Andrey Repin (anrdae...@freemail.ru) 17.08.2010, <5:59>

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: 1.7.5 XWin trouble

2010-08-16 Thread Larry Hall (Cygwin)

On 8/16/2010 7:50 PM, Russell Peterson wrote:

Hello,

After having recently upgraded to cygwin 1.7.5, I have noticed a
strange problem with my xterm windows.  Everything works just fine
until I use windows remote desktop to "control" the system with the
XWin server and xterm windows on it.  At that point, the fonts in the
xterm windows become unreadable (all sorts of strange colors and
garbage)... XWin becomes unresponsive at that point and I need to
restart it.  I think it crashed (stackdump included).

I have no idea what this could be.  Any clues as to what I am looking for?


Since your issue is with Cygwin-X, you should send it to the cygwin-xfree
list.

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

_

A: Yes.

Q: Are you sure?

A: Because it reverses the logical flow of conversation.

Q: Why is top posting annoying in email?


--
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: Path conversion issue

2010-08-16 Thread Larry Hall (Cygwin)

On 8/16/2010 10:03 PM, Andrey Repin wrote:

Greetings, All!

Trying to find differences between local and remote file, I run into an issue:

diff.exe -cdb -x "CVS" -x ".svn" -I "\$Id.*\$" --strip-trailing-cr -- 
"C:\...\php-tools\GalleryClass.php" "\\REMOTE\C$\...\php-tools\GalleryClass.php"
diff: \REMOTE\C$\...\php-tools\GalleryClass.php: No such file or directory

Why it ate the leading backslash? Isn't it supposed to convert UNC path to
proper one? User's guide tell me this shouldn't be an issue, or so I read it
this way. Can anyone enlighten me on this matter, please?


'\' is a escape character for Cygwin just the way it is in UNIX/Linux.
You either need to escape it or, better yet, use forward slashes.

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

_

A: Yes.

Q: Are you sure?

A: Because it reverses the logical flow of conversation.

Q: Why is top posting annoying in email?


--
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: diff /usr/include/endian.orig.h /usr/include/endian.h > endian.h.diff

2010-08-16 Thread Pedro Izecksohn
  As this thread went nowhere, I searched for the BSD code:
http://svn.freebsd.org/viewvc/base/stable/8/sys/sys/endian.h?revision=199583&view=markup

  It uses x to represent the variable as I did; but it also casts the variable.

  I think that casting is not desirable because I like to see warnings.

--
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: Postinstall for mintty fails when installing "just for me"

2010-08-16 Thread Andy Koppe
On 17 August 2010 02:26, Buchbinder, Barry wrote:
> $ bash --norc --noprofile /etc/postinstall/mintty.sh
> /bin/mkdir: cannot create directory `/c/Documents and Settings/All 
> Users/Start Menu/Programs/Cygwin': Permission denied
> mkshortcut: Saving "C:\Documents and Settings\All Users\Start 
> Menu\Programs\Cygwin\mintty.lnk" failed; does the target directory exist?
> /bin/chmod: cannot access `/c/Documents and Settings/All Users/Start 
> Menu/Programs/Cygwin/mintty.lnk': No such file or directory
> echo $?
> 1

Hmm, the test at the top of the script is meant to avoid that, by
checking whether the 'All Users/Start Menu/Programs' folder is
writable. Any idea why that's saying yes when apparently it isn't
writable?

Is there a proper way for a postinstall script to find out whether
it's an install for all users or "Just Me"?

Here's the script for reference:

PROGS=$(/bin/cygpath -AP)
if [ -w "$PROGS" ]; then
  /bin/mkdir -p "$PROGS/Cygwin"
  /bin/mkshortcut -AP -n Cygwin/mintty -a - -d Terminal /bin/mintty.exe
  /bin/chmod a+r "$PROGS/Cygwin/mintty.lnk"
else
  /bin/mkdir -p "$(/bin/cygpath -P)/Cygwin"
  /bin/mkshortcut -P -n Cygwin/mintty -a - -d Terminal /bin/mintty.exe
fi

Andy

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



Re: 1.7.5 XWin trouble

2010-08-16 Thread Morgan Gangwere
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 8/16/2010 9:11 PM, Larry Hall (Cygwin) wrote:
> Since your issue is with Cygwin-X, you should send it to the cygwin-xfree
> list.

Or, just install ssh and run X over SSH. Problem solved wit PuTTY and
Portable Xming. (I do this all the time at university )

Less bandwidth and better fonts :)

- -- 

Morgan Gangwere

>> Why?
> Because it breaks the logical flow of conversation, plus makes
messages unreadable.
>>> Top-Posting is evil.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)

iQIcBAEBAgAGBQJMajJEAAoJEEURiCSotvJDMRkP/0tth67t4D0apLJ2xO3H/T7P
Kb3qEU3urhyxHaHuJwaEGR4YaznzAPtQoXpQ74+M5H38XYCNWswPA2uagEgO+g1i
w6BrlOMuOCmpoCCj1gugowhVVXUcIj7otlaT0G6ZA08AT+oJYTpS2B3Qzwy+QX1V
kOmusrt1JYg/0T9A+6n1dMSTWsYNog2SSsNmd5rEDLhqxmsgB32R04Hhgz67EuXy
987nVnew4xWuZKrDpisCVjMy1XnUt9DjpnoiQa+BKySd/V2lBB0Bqw7mR87r9lt6
Wfm7uJPi4/5lyRp9E976zIxgakNr0FoE6VKwm2AF8cHcll0SDyH9YMndi33GjVjQ
i56ABUaB+jF0iLjrsQ8RcOMKn5dm0Z3GsOziTl7RlD2PQ4E+/jBdu0w8N89ROI+V
/UsZvuVpH9zEQiRn0YYeMrmaaQ9Ugsf1thYyVcMq3IFWZNiHQwlHRBirRsTXiAEi
csrVNTWo0Q+o/vFAcmEOmPSYUeGeNDGMVb0XXNi4egRChvJdn/awvizb4GIWO74e
C+djzpw6IsRdZzIzE8oqtE5ce9BwTkS+ML0AhRJtnvv5ub9/j+n4g2OC9zkGSDVE
aiFz6xEGe/wx0/54x4uRUNWAW6vy6hMQphes6S2+aJqqg96ejwHYgW+5Pt+fhoC1
mpDgCdsvyhMxk7OkGRT8
=dYG4
-END PGP SIGNATURE-

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