Message-ID: <4R29W4$OXm@newsmth.net>
Subject: Re: ���使���exec
Date: Mon, 06 Nov 2006 04:18:27 +0000
From: Kaffir@newsmth.net-SPAM.no (Alone in the shadow)
Path: news.cnusenet.org!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-cn.bbs.comp.lang.perl.mbox.zip!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.gamma.ru!Gamma.RU!newsfeed.simtel.ru!Simtel.RU!news.newsmth.net!NEWSMTH
Newsgroups: cn.bbs.comp.lang.perl
Organization: 水木����
Mime-Version: 1.0
Content-Type: text/plain; charset="gb2312"
Content-Transfer-Encoding: 8bit
X-Filename: Perl/o/M.1162786564.B0
Xref: news.cnusenet.org cn.bbs.comp.lang.perl:29979

ssh -f 应������ fork ��实��background执��

fork之�蟾附�探��� ��慕疟��母����也�痛� waitpid ������

�� �� ylan (yeoyeoman) �拇������到: ��
: if (my $pid = fork) {
:     waitpid($pid, 0);
:     print "end exec\n";
:     #print wait();                                                                                                
: }
: else {
:     defined($pid) or die "fork: $!";
:     print "start exec\n";
:     exec "ssh -f $opt_s ping -c 10 $opt_d > pingout";
: }
: ���������������为什么ping��没�薪��� ����叹�直������执�����兀�
: ������ping ��� ��执�泻���牟����� 应������写�兀�
: 谢谢����


--
"undefined" ---- The behavior for something incorrect, on which the
standard does not impose any requirements. Anything is allowed to
happen, from nothing, to a warning message to program termination,
to CPU meltdown, to launching nuclear missiles (assuming you have
the correct hardware option installed)
                                   ---<Expert C Programming>


�� ��源:��水木���� newsmth.net��[FROM: 193.11.244.*]