#!/usr/bin/perl # $Id: combineRun,v 1.3 2005/11/03 16:22:17 anders Exp $ # Copyright (c) 1996-1998 LUB NetLab # # See the file LICENCE included in the distribution. $pidfile = shift @ARGV; open(PID,">$pidfile"); print PID "$$\n"; close PID; while (1) { if ( system(@ARGV) < 0 ) { sleep 30; } } __END__ =head1 NAME combineRun - starts, monitors and restarts a combine harvesting process =head1 SYNOPSIS combineRun =head1 DESCRIPTION Starts a program and monitors it in order to make sure there is alsways a copy running. If the program dies it will be restarted with the same parameters. Used by C when starting combine crawling. =head1 SEE ALSO combineCtrl =head1 AUTHOR Anders Ardö, Eanders.ardo@it.lth.seE =head1 COPYRIGHT AND LICENSE Copyright (C) 2005 Anders Ardö This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.4 or, at your option, any later version of Perl 5 you may have available. See the file LICENCE included in the distribution at L =cut