lib/scripts/feeder.pl
author wenzelm
Sun, 05 Jun 2005 11:31:17 +0200
changeset 16254 1b2683e18fd2
parent 14981 e73f8140af78
child 29145 b1c6f4563df7
permissions -rw-r--r--
DISCGARB_OPTIONS: proper treatment of specific polyml versions; the feeder is back (previous version did not really work with Isar.loop);

#
# $Id$
# Author: Markus Wenzel, TU Muenchen
#
# feeder.pl - feed isabelle session
#

# args

($head, $emitpid, $quit, $tail) = @ARGV;


# setup signal handlers

sub hangup { exit(0); }
$SIG{'HUP'} = "hangup";
$SIG{'INT'} = "IGNORE";


# main

#buffer lines
$| = 1;


$emitpid && (print $$, "\n");

$head && (print "$head", "\n");

if (!$quit) {
    while (<STDIN>) {
	print;
    }
}

$tail && (print "$tail", "\n");


# wait forever

close STDOUT;
sleep;