diff options
| author | fukachan <fukachan> | 2003-09-13 13:02:32 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2003-09-13 13:02:32 +0000 |
| commit | b62faef4b62e65a08076ef8f9acc00e48406dca2 (patch) | |
| tree | f4989d129bc2f92091345f5e105a352ff5d79d91 /fml/lib/FML | |
| parent | a928f809469168347abc99f8ad9d9da1d59c23fd (diff) | |
| download | fml8-b62faef4b62e65a08076ef8f9acc00e48406dca2.tar.gz fml8-b62faef4b62e65a08076ef8f9acc00e48406dca2.tar.bz2 fml8-b62faef4b62e65a08076ef8f9acc00e48406dca2.zip | |
implement is_cgi_process(), is_under_mta_process().
Diffstat (limited to 'fml/lib/FML')
| -rw-r--r-- | fml/lib/FML/Process/Utils.pm | 51 |
1 files changed, 50 insertions, 1 deletions
diff --git a/fml/lib/FML/Process/Utils.pm b/fml/lib/FML/Process/Utils.pm index db80ac77..9f893fd1 100644 --- a/fml/lib/FML/Process/Utils.pm +++ b/fml/lib/FML/Process/Utils.pm @@ -4,7 +4,7 @@ # All rights reserved. This program is free software; you can # redistribute it and/or modify it under the same terms as Perl itself. # -# $FML: Utils.pm,v 1.77 2003/09/05 09:01:26 fukachan Exp $ +# $FML: Utils.pm,v 1.78 2003/09/06 03:34:05 fukachan Exp $ # package FML::Process::Utils; @@ -1092,6 +1092,55 @@ sub __get_virtual_maps } +=head2 is_cgi_process() + +inform whether this process runs as cgi ? + +=head2 is_under_mta_process() + +inform whether this process runs under MTA ? + +=cut + + +# Descriptions: whether this process runs as cgi ? +# Arguments: OBJ($curproc) +# Side Effects: none +# Return Value: NUM(1 or 0) +sub is_cgi_process +{ + my ($curproc) = @_; + my $name = $curproc->myname(); + + if ($name =~ /\.cgi$/) { + return 1; + } + + return 0; +} + + +# Descriptions: whether this process runs as cgi ? +# Arguments: OBJ($curproc) +# Side Effects: none +# Return Value: NUM(1 or 0) +sub is_under_mta_process +{ + my ($curproc) = @_; + my $name = $curproc->myname(); + + if ($name eq 'distribute' || + $name eq 'command' || + $name eq 'digest' || + $name eq 'error' || + $name eq 'fml.pl' ) { + return 1; + } + + return 0; +} + + =head2 get_ml_list() get ARRAY_REF of valid mailing lists. |
