Re: persistant psql feature suggestion

Поиск
Список
Период
Сортировка
От PeterKorman
Тема Re: persistant psql feature suggestion
Дата
Msg-id 20030630013835.GA13745@eigenvision.com
обсуждение исходный текст
Ответ на persistant psql feature suggestion  (James Pye <jwp@rhid.com>)
Список pgsql-hackers
On Sun, Jun 29, 2003 at 05:24:18PM -0400, Andrew Dunstan wrote:
> 
> ----- Original Message ----- 
> From: "PeterKorman" <calvin-pgsql-ml@eigenvision.com>
> > 
> > I like your solution. But I think I'd code it:
> > 
> > my $psqlpid = open(OUTPIPE,"|-") || die qq(cant fork: $!);
> > 
> 
> Won't that cause the child to die because it will have 0 in  $psqlpid?

Doh!!

A rhetorical question, no doubt.


----------------------------------------------------------
#!/usr/bin/perl
                  
 

#except for sigchld, This is better.

my $pid;
defined($pid=open(X, "|-")) || die qq(cant fork: $!\n);

if ($pid){   system(qq(touch parent));
}
else{   system(qq(touch child));
};

----------------------------------------------------------

I wrongly guessed that control would resume at the line 
following:

> my $psqlpid = open(OUTPIPE,"|-") || die qq(cant fork: $!);

There are, evidently, many things I'm too stupid to remember;-\

Cheers,


JPK





В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Jim C. Nasby"
Дата:
Сообщение: pgsql-hackers@postgresql.org
Следующее
От: Tom Lane
Дата:
Сообщение: Re: PlPython