From: | "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com> |
---|---|
To: | "ON(dot)KG" <skyer(at)on(dot)kg> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: PL/Perl |
Date: | 2005-01-11 16:04:43 |
Message-ID: | 41E3F91B.4010306@commandprompt.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
ON.KG wrote:
>Hi All!
>
>I'm trying in 'plperl' forking the processes by 'fork' function,
>but receiving this message
>
>
Have you tried performing this with plperlU?
Sincerely,
Joshua D. Drake
>Warning: pg_exec(): Query failed: ERROR: creation of function failed: 'fork' trapped by operation mask at (eval 2) line 11.
>
>Does it mean, that in 'plperl' I can't use 'fork' function???
>
>function example
>=================
>CREATE OR REPLACE FUNCTION perl_fork_test ()
>RETURNS int2
>AS '
>my %pid;
>
>my @urls = (
> "http://domain1.com/index.php",
> "http://domain2.com/index.php"
>);
>
>foreach my $url (@urls) {
> unless ($pid{$url} = fork) {
> my $html = qx/GET "$url"/;
>
> $ENV{TERM} = &my_exit;
>
> sub my_exit {
> exit(0);
> }
> }
>}
>
>sleep 6;
>foreach my $url (keys %pid) {
> kill SIGTERM, $pid{$url};
>}
>
>wait;
>
>return 1;
>'
>LANGUAGE 'plperl';
>===================
>VOLATILE
>CALLED ON NULL INPUT
>SECURITY INVOKER
>===================
>
>Thanx
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 7: don't forget to increase your free space map settings
>
>
--
Command Prompt, Inc., home of Mammoth PostgreSQL - S/ODBC and S/JDBC
Postgresql support, programming shared hosting and dedicated hosting.
+1-503-667-4564 - jd(at)commandprompt(dot)com - http://www.commandprompt.com
PostgreSQL Replicator -- production quality replication for PostgreSQL
Attachment | Content-Type | Size |
---|---|---|
jd.vcf | text/x-vcard | 285 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | lol | 2005-01-11 16:16:27 | Re: PostgreSQL 8 on windows very slow |
Previous Message | Terry Lee Tucker | 2005-01-11 16:03:14 | Re: Interval Question |