File: simple_rwp.pl

package info (click to toggle)
libmojo-ioloop-readwriteprocess-perl 1.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 540 kB
  • sloc: perl: 4,655; sh: 101; makefile: 2
file content (11 lines) | stat: -rwxr-xr-x 361 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/perl
use FindBin;
use lib ("$FindBin::Bin/../../lib");
use Mojo::IOLoop::ReadWriteProcess 'process';

# Not all systems have /bin/true, this is /usr/bin/true on osx for instance
my $p
  = process(execute => 'command -v true || which true')
  ->start()
  ->wait_stop->read_all_stdout;
exit process(execute => $p)->start()->wait_stop()->exit_status();