
Module:   Proc::Simple.pm    Version 1.19 (07/01/2001)

Author:   Michael Schilli

Description:

   Proc::Simple helps controlling background processes in Perl. It 
   provides "Process Objects" that mimic their real world 
   counterparts. You don't have to deal with fork and wait and 
   friends, Proc::Simple is very easy to use, you just start 
   processes in background, poll their status once in a while and 
   kill them if necessary. 

   Proc::Simple is reportedly used in monitoring applications that 
   fire up external programs, or software that batch processes user 
   programs by launching them in parallel in order to put constant 
   load on an expensive number-crunching machine. 

Synopsis:       

   use Proc::Simple;

   $myproc = Proc::Simple->new();        # Create a new process object

   $myproc->start("shell-command-line"); # Launch an external program
   $myproc->start("command",             # Launch an external program
                  "param", ...);         # with parameters
                                        
   $myproc->start(sub { ... });          # Launch a perl subroutine
   $myproc->start(\&subroutine);         # Launch a perl subroutine
   $myproc->start(\&subroutine,          # Launch a perl subroutine
                  $param, ...);          # with parameters

   $running = $myproc->poll();           # Poll Running Process

   $proc->kill_on_destroy(1);            # Set kill on destroy
   $proc->signal_on_destroy("KILL");     # Specify signal to be sent
                                         # on destroy

   $myproc->kill();                      # Kill Process (SIGTERM)

   $myproc->kill("SIGUSR1");             # Send specified signal

   $myproc->exit_status();               # Return exit status of process


   Proc::Simple::debug($level);          # Turn debug on

Changes:       
          from 1.18: Added multi-arg start method (proposed by
                     Clauss Strauch <Clauss_Strauch@aquila.fac.cs.cmu.edu>)

          from 1.17: Fixed Version difference between Makefile.PL
                     and Simple by using VERSION_FROM (thanks
                     Andreas Koenig)

          from 1.16: Fixed bug with Proc::Simple instances which
                     were DESTROYED before they were ever started.
                     Many thanks to Russell Fulton (r.fulton@auckland.ac.nz)
                     for pointing this out.

          from 1.15: Added %DESTROYED hash for processes which might
                     still in zombie state right after their objects
                     went out of business. THE_REAPER will take care
                     of them.

          from 1.14: Added exit_status() method and a smart
                     REAPER which reaps only processes we've started before.

          from 1.13: Replaced two erronous uses of 'exists' by 'defined'.
                     Thanks to Rolf.Beutner@telekom.de for pointing this
                     out.
          from 1.12: To fight problems with zombies, replaced the wait()
                     function by a NOWAIT waitpid on systems that 
                     support it.

                     Tim Jenness <t.jenness@jach.hawaii.edu> included
                     kill_on_destroy/sig_on_destroy/pid methods.

          from 1.11: binkley's error: threw out waitpid, wait is
                     performed by signal handler now.

          from 1.1:  Process is now called Proc::Simple to fit in the
                     CPAN namespace, corrections Andreas Koenig suggested.

First Release:  05/22/96

Requirements:  Perl 5.6.0

Manpages:      Embedded in Proc::Simple.pm as usual, just call:

               perldoc Proc::Simple

Installation:

	       perl Makefile.PL
	       make 
	       make test
	       make install

Copyright:     (c) 1996-2001 Michael Schilli. All rights reserved. This 
               program is free software, you can redistribute it and/or 
               modify it under the same terms as Perl itself.

Have fun!

Michael Schilli procsimple@perlmeister.com
