[csw-devel] SF.net SVN: gar:[20420] csw/mgar/gar/v2/bin/pcopy

dmichelsen at users.sourceforge.net dmichelsen at users.sourceforge.net
Mon Mar 11 15:06:43 CET 2013


Revision: 20420
          http://gar.svn.sourceforge.net/gar/?rev=20420&view=rev
Author:   dmichelsen
Date:     2013-03-11 14:06:42 +0000 (Mon, 11 Mar 2013)
Log Message:
-----------
mGAR v2: Merge pipes

Modified Paths:
--------------
    csw/mgar/gar/v2/bin/pcopy

Modified: csw/mgar/gar/v2/bin/pcopy
===================================================================
--- csw/mgar/gar/v2/bin/pcopy	2013-03-11 12:32:51 UTC (rev 20419)
+++ csw/mgar/gar/v2/bin/pcopy	2013-03-11 14:06:42 UTC (rev 20420)
@@ -7,6 +7,7 @@
 use File::Copy;
 use File::Find;
 use File::Path qw(make_path);
+use POSIX qw(mkfifo);
 use Pod::Usage;
 use Getopt::Long;
 
@@ -135,6 +136,12 @@
     return;
   }
 
+  # Create FIFOs on destination
+  if( -p $whole ) {
+    mkfifo( $todir . '/' . $target, (stat( $whole ))[2] );
+    return;
+  }
+
   # Copy with preserving hardlinks
   if( -l $whole ) {
     my $link = readlink( $whole );

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list