Do you want a filehandle or Process ID ?
If you want the process ID use code like:
# SAMPLE CODE
#
=========================================================================
my @proclist = grep {/\/my process name/} qx/ps -ef | grep my
process/;
# get all processes
containing 'my process'
if ($#proclist < 0)
{
print STDERR "my process not found.\n" ;
}
else
{
my @params = split(/\s+/,$proclist[0]); # get all parameters for
the first (normally unique) process encountered
my $pid = $params[2];
# do something
}
# END OF SAMPLE CODE
#
=========================================================================
Regards
Stephen
-----Original Message-----
From: Kristofer Wolff [mailto:[EMAIL PROTECTED]]
Sent: 05 December 2001 15:18
To: Chuck Brewer; perllist
Subject: AW: Offtopic // webserver perl
I found this in the prog
my modifikation, a bit easyer as the original:
if($INTERPRETER{$inter})
{
$exec_file = "$INTERPRETER{$inter}
$file";
local (*IN,*OUT,*ERR);
if
(open3(\*OUT,\*IN,\*ERR,"$exec_file"))
{
my $params = '';
if (! defined
$ENV{'CONTENT_TYPE'}) {
$params = $query_string;
} else {
$params = $r->content
if (defined $r->content);
}
print OUT "$params\n";
print OUT "\n";
$return = join('',<IN>);
if (my $err = join('',
<ERR>))
{
$return = $err.$CRLF.
($return || '');
}
close(OUT) || die "can't
close OUT connection to PIPE $file $!";
close(IN) || die "can't
close IN connection to PIPE $file $!";
close(ERR) || die "Can't
close ERR connection to PIPE $file $!";
$c->send_response($return);
}
}
And it is fo F**** slow !!!! It works, but i went and make a coffee in this
time.
is there is a oppunity to speet this up ?
-----Urspr�ngliche Nachricht-----
Von: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]Im Auftrag von
Chuck Brewer
Gesendet: Dienstag, 4. Dezember 2001 17:48
An: Perl 32 Web (E-mail)
Betreff: RE: Offtopic // webserver perl
Found this on Sourceforge, doesn't look like its seen activity in a while
though it might be a good base:
http://sourceforge.net/projects/perlwebserver/ There were a couple other on
Sourceforge that may have been interesting. You can do a search through that
link for the rest. -----Original Message----- From: Kristofer Wolff
[mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 04, 2001 3:34 AM To:
perllist Subject: Offtopic // webserver perl Hi folks, a bit off topic...
since a while i am using Xitami an my WIN localhost and Apache on a
Unix-server for my works, it runs fine . and by the way i like Xitami very
much. I build up a whole CMS and made a Admin Tool-Bundle set for Win32
Servers and Linux too. All is nerly done, but i havn't a Webserver. I would
like it in Perl, because i want add my own functions (logging
authentifikation AND of couse include it in my installation set). Does
anybody know a opensource webserver written in perl ? Thanx Kris
_______________________________________________ Perl-Win32-Web mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web
_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web
_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web
_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web