Debian Codegraph @

examples/pipe.pl

raw
1 use strict;
2 use warnings;
3 use FFI::Platypus 2.00;
4
5 my $ffi = FFI::Platypus->new( api => 2 );
6 $ffi->lib(undef);
7 $ffi->attach([pipe=>'mypipe'] => ['int[2]'] => 'int');
8
9 my @fd = (0,0);
10 mypipe(\@fd);
11 my($fd1,$fd2) = @fd;
12
13 print "$fd1 $fd2\n";