added first-order TPTP version of Nitpick to Isabelle, so that its sources stay in sync with Isabelle and it is easier to install new versions for SystemOnTPTP and CASC -- the tool is called "isabelle nitrox" but is deliberately omitted from the tool list unless the component is explicitly enabled, to avoid clutter
#!/usr/bin/env perl
#
# Author: Makarius
#
# exec process - with optional process group and report of pid
#
use warnings;
use strict;
# process group
my $group = $ARGV[0]; shift(@ARGV);
if ($group eq "group") {
use POSIX "setsid";
POSIX::setsid || die $!;
}
# report pid
my $pid_name = $ARGV[0]; shift(@ARGV);
if ($pid_name eq "-") {
print "$$\n";
}
else {
open (PID_FILE, ">", $pid_name) || die $!;
print PID_FILE "$$";
close PID_FILE;
}
# exec process
my $script = $ARGV[0]; shift(@ARGV);
if ($script eq "script") {
my $cmd_line = $ARGV[0]; shift(@ARGV);
exec $cmd_line || die $!;
}
else {
(exec { $ARGV[0] } @ARGV) || die $!;
}