Track the mapping between source shared hash keys and target shared
[p5sagit/p5-mst-13.2.git] / README.cygwin
index a2748f3..5f8d327 100644 (file)
@@ -369,6 +369,8 @@ A C<fork()> failure may result in the following tests failing:
 
 See comment on fork in L<Miscellaneous> below.
 
+=head1 Specific features of the Cygwin port
+
 =head2 Script Portability on Cygwin
 
 Cygwin does an outstanding job of providing UNIX-like semantics on top of
@@ -436,6 +438,15 @@ However, when accessing an executable as a normal file (e.g., I<cp>
 in a makefile) the F<.exe> is not transparent.  The I<install> included
 with Cygwin automatically appends a F<.exe> when necessary.
 
+=item * cygwin vs. windows process ids
+
+Cygwin processes have their own pid, which is different from the
+underlying windows pid.  Most posix compliant Proc functions expect
+the cygwin pid, but several Win32::Process functions expect the
+winpid. E.g. C<$$> is the cygwin pid of F</usr/bin/perl>, which is not
+the winpid.  Use C<Cygwin::winpid_to_pid()> and C<Cygwin::winpid_to_pid()> 
+to translate between them.
+
 =item * C<chown()>
 
 On WinNT C<chown()> can change a file's user and group IDs.  On Win9x C<chown()>
@@ -470,6 +481,25 @@ F<http://www.cygwin.com/setup.exe> to install it and run rebaseall.
 
 =back
 
+=head2 Prebuilt methods:
+
+=over 4
+
+=item C<Cwd::cwd>
+
+Returns current working directory.
+
+=item C<Cygwin::pid_to_winpid>
+
+Translates a cygwin pid to the corresponding Windows pid (which may or
+may not be the same).
+
+=item C<Cygwin::winpid_to_pid>
+
+Translates a Windows pid to the corresponding cygwin pid (if any).
+
+=back
+
 =head1 INSTALL PERL ON CYGWIN
 
 This will install Perl, including I<man> pages.
@@ -528,12 +558,14 @@ be kept as clean as possible (listing not updated yet).
   t/op/stat.t           - no /dev, skip Win32 ftCreationTime quirk
                           (cache manager sometimes preserves ctime of file
                           previously created and deleted), no -u (setuid)
+  t/lib/cygwin.t       - builtin cygwin function tests
 
 =item Compiled Perl Source
 
   EXTERN.h              - __declspec(dllimport)
   XSUB.h                - __declspec(dllexport)
-  cygwin/cygwin.c       - os_extras (getcwd, spawn)
+  cygwin/cygwin.c       - os_extras (getcwd, spawn, Cygwin::winpid_to_pid, 
+                          Cygwin::pid_to_winpid)
   perl.c                - os_extras
   perl.h                - binmode
   doio.c                - win9x can not rename a file when it is open
@@ -582,4 +614,4 @@ Gerrit P. Haase <gp@familiehaase.de>.
 
 =head1 HISTORY
 
-Last updated: 2003-08-12
+Last updated: 2005-02-11