develooper Front page | perl.module-authors | Postings from November 2003

Re: My new module Proc:Daemontools

Thread Previous | Thread Next
From:
Bruno Negrao
Date:
November 6, 2003 12:22
Subject:
Re: My new module Proc:Daemontools
Message ID:
001901c3a4a3$c06561c0$5100a8c0@plugway.com.br
RE: My new module Proc:DaemontoolsDaemontools works only for linux/unix, not for windows. My module depends on Daemontools so this module does not work for Windows.

bnegrao.
  ----- Original Message ----- 
  From: Orton, Yves 
  To: 'Bruno Negrao' ; module-authors@perl.org 
  Sent: Thursday, November 06, 2003 2:12 PM
  Subject: RE: My new module Proc:Daemontools


  > It(amongst other things) guarantees that the daemons will never stop 
  > working. 

  Shouldn't that read "it guarantees that unix daemons will never stop working"? 

  Is it cross platform? Can I use it on my Win32 box? 

  Yves 



  > -----Original Message----- 
  > From: Bruno Negrao [mailto:qmail@engepel.com.br] 
  > Sent: 05 November 2003 22:32 
  > To: module-authors@perl.org 
  > Subject: My new module Proc:Daemontools 
  > 
  > 
  > Hi all, 
  > 
  > I wrote a Perl module called Proc::Daemontools and I planning 
  > to publish 
  > it on CPAN. Before I do this, i´d like to gather some 
  > opinions about things 
  > as its name, its functionalities, etc. 
  > 
  > Daemontools is a product made by Dan Bernstein designed to 
  > control daemons. 
  > It(amongst other things) guarantees that the daemons will never stop 
  > working. 
  > 
  > Now, this module interacts only with svc, svok and svstat executables. 
  > 
  > Bellow is its Synopsis: 
  > -------------------------------------------------------------- 
  > ------------- 
  > use Proc::Daemontools; 
  > 
  > # assuming everything is in the default directories 
  > my $svc = new Proc::Daemontools; 
  > 
  >     or 
  > 
  > my $svc = new Proc::Daemontools ( 
  >                 DAEMONTOOLS_DIR =>"/some-non-default-dir", 
  >                 SERVICE_DIR    => "/some-non-default-dir" 
  >             ); 
  > 
  > my $daemon="qmail-send"; 
  > 
  > # We want to stop $daemon 
  > if ( $svc->isUp($daemon) ) { 
  >     if ( $svc->down($daemon) ) {  # it returns true if it was 
  > successful 
  >         print "OK, $daemon stopped. \n"; 
  >     } else { 
  >         print "Ops, $daemon didn´t stop yet. Maybe it is 
  > waiting for some". 
  >         " child to exit. Perhaps you want to kill them by 
  > yourself...\n"; 
  >     } 
  > } 
  > 
  > # Now we want it to start 
  > if ( $svc->up($daemon) ) { 
  >     print "OK, $daemon started. \n". 
  > } 
  > 
  > $daemon="qmail-smtpd"; 
  > 
  > # Let´s see what svstat says about $daemon: 
  > print "The current status of $daemon reported by svstat is: " . 
  >       $svc->status($daemon) ."\n"; 
  > 
  > Any comments will be appreciated, 
  > Bruno Negrao. 
  > 
  > 
  > 

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About