This commit is contained in:
Nick Bebout 2015-05-28 12:04:57 -05:00
parent 4a536871fe
commit e2bfc931f4
206 changed files with 7348 additions and 7982 deletions

21
W/learn/ipc_open2 Executable file
View file

@ -0,0 +1,21 @@
#!/usr/bin/perl -w
use strict ;
use IO::Handle ;
use IPC::Open2 ;
my( $chld_out, $chld_in ) = ( IO::Handle->new, IO::Handle->new ) ;
my $pid = open2( $chld_out, $chld_in, 'cat -n' ) ;
print $chld_in "LALALA\n" x 50000 ;
print $chld_in "LALALA\n" ;
print $chld_in "LALALA\n" ;
$chld_in->close ;
my @out = <$chld_out> ;
waitpid( $pid, 0 );
my $child_exit_status = $? >> 8;
print @out ;

17
W/learn/pipemess Executable file
View file

@ -0,0 +1,17 @@
#!/usr/bin/perl -w
# $Id: $
use strict ;
open( READCMD, "cat -n /etc/passwd |" ) ;
my @out = <READCMD> ;
close( READCMD ) ;
print @out ;
exit ;