[CLUE-Tech] Re: perl fork

Jason S. Friedman jason at powerpull.net
Sun Jul 4 20:59:16 MDT 2004


Very helpful, thank you.

Just wanting to close the loop on this one.  The file test
should be "-e" rather than "-f".  And, on AIX the
/proc/$pid directory can still exist even if the command
has entered a zombie state, so it's probably safer to call
'-e "/proc/$pid/status"'

> Here's one approach:
>
> my $command = 'long running command';
> my $pid = system( $command );
>
> while ( -f "/proc/$pid" ) {
>     # still running
>     # your code to decide if it should fail or wait
>     sleep( 1 ); # sleep 1 second
> }
>
>
> On 7/1/04 2:59 PM, "Jason S. Friedman"
> <jason at powerpull.net> wrote:
>
>> I'm wanting to execute a shell command from within a
>> Perl
>> program and fail if it does not return with a specified
>> number of seconds.
>>
>> It's okay (in fact, preferable) if the system call
>> continues to run, I just want the Perl wrapper program
>> to
>> fail so that I can alert an operator that something
>> might
>> be wrong.
>>
>> How?
>>
>> I've got this far:
>> $command = "/usr/bin/long_running_exec";
>> system( $command );
>> $exit_status = $CHILD_ERROR>>8;
>> _______________________________________________
>> CLUE-Tech mailing list
>> Post messages to: CLUE-Tech at clue.denver.co.us
>> Unsubscribe or manage your options:
>> http://clue.denver.co.us/mailman/listinfo/clue-tech
>
>
>
> --__--__--
>
> Message: 5
> Date: Thu, 01 Jul 2004 17:21:13 -0600
> From: Nate Duehr <nate at natetech.com>
> To: clue-tech at clue.denver.co.us
> Subject: Re: [CLUE-Tech] Impressive, Green One
> Reply-To: clue-tech at clue.denver.co.us
>
> Kevin Fenzi wrote:
>
>>Humm... from your review it's hard to see where you find
>> SuSe personal
>>so far ahead. ;) They sound pretty similar: install
>> worked on
>>both. Screen size wasn't detected correctly by either.
>> Sound and
>>Network were problematic on both.
>>
>>
>
> That's 'cause it's hard for me to explain... the YaST
> stuff for
> configuration just seems to work correctly and not do
> anything insane
> underneath the pretty GUI to configuration files I've
> messed with by
> hand... but unless someone's watched other GUI-based
> configuration
> programs trash their hand-made configs, it's very
> intangible.
>
> Also Fedora Core 2 felt very very slow on the machine --
> like the kernel
> was compiled with some incorrect option somewhere.  But I
> also added RAM
> inbetween so I've been saying publically that was the
> problem.  But I
> don't fully believe it... FC2 was VERY VERY slow on this
> hardware.  More
> than my experience can chalk up to adding RAM fixing it.
> But I'd have
> to blow away SuSE and put FC2 back on here with the higher
> RAM to prove
> it.  And I don't like pointing the finger on the website
> at FC2 without
> having actually done the test...
>
>>On bluecurve (I also think it's fuggly) it's just a
>> theme, you should
>>be able to download and switch to any kde/gnome theme you
>> like.
>>I have a bunch of KDE themes I snagged and I never use
>> bluecurve. ;)
>>
>>
> Agreed here, but first impressions... (GRIN)... the
> installer was just
> so much cleaner... and remember, I'm used to Debian's
> installer.   (Cough.)
>
>>Nate> Yay Novell for allowing SuSE to release the ISO
>> images!
>>
>>Agreed. More linux the better IMHO. ;)
>>
>>
> Amen!  (GRIN)
>
> I can't share the details, but the question came up at
> work today about
> why we don't have a Linux port and run on Solaris... it
> was just
> rumblings from a larger business thing going on far away
> from me, but I
> was super-happy to hear Linux rumblings inside the telco
> world today.
> Finance, Airlines, Research, and all the really high-end
> folks went to
> Linux before the mid-range and the low-end thanks to
> clustering... I'm
> just waiting for it to trickle back down to me so I can
> get back to
> "daily Linux"... I miss it.
>
>>Now back to downloading the latest knoppix so I can burn
>> a bunch of
>>copies and spread them around while I am traveling this
>> weekend.
>>
>>
> You putting them inside the hotel room Bibles like Sean?
> Heh heh.
> :-)   I thought that was hilarious.
>
> Nate Duehr, nate at natetech.com
>
> --__--__--
>
> Message: 6
> Date: Thu, 1 Jul 2004 20:32:58 -0600
> From: Kevin Fenzi <kevin at scrye.com>
> From: Kevin Fenzi <kevin at scrye.com>
> To: clue-tech at cluse.denver.co.us
> Subject: Re: [CLUE-Tech] Impressive, Green One
> Reply-To: clue-tech at clue.denver.co.us
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>>>>>> "Nate" == Nate Duehr <nate at natetech.com> writes:
>
> Nate> Kevin Fenzi wrote:
>>> Humm... from your review it's hard to see where you
>>> find SuSe
>>> personal so far ahead. ;) They sound pretty similar:
>>> install worked
>>> on both. Screen size wasn't detected correctly by
>>> either. Sound and
>>> Network were problematic on both.
>
> Nate> That's 'cause it's hard for me to explain... the
> YaST stuff for
> Nate> configuration just seems to work correctly and not
> do anything
> Nate> insane underneath the pretty GUI to configuration
> files I've
> Nate> messed with by hand... but unless someone's watched
> other
> Nate> GUI-based configuration programs trash their
> hand-made configs,
> Nate> it's very intangible.
>
> Yeah...
>
> Nate> Also Fedora Core 2 felt very very slow on the
> machine -- like
> Nate> the kernel was compiled with some incorrect option
> somewhere.
> Nate> But I also added RAM inbetween so I've been saying
> publically
> Nate> that was the problem.  But I don't fully believe
> it... FC2 was
> Nate> VERY VERY slow on this hardware.  More than my
> experience can
> Nate> chalk up to adding RAM fixing it.  But I'd have to
> blow away
> Nate> SuSE and put FC2 back on here with the higher RAM to
> prove it.
> Nate> And I don't like pointing the finger on the website
> at FC2
> Nate> without having actually done the test...
>
> Yeah, understandable. It may well be that it is slower...
>
>>> On bluecurve (I also think it's fuggly) it's just a
>>> theme, you
>>> should be able to download and switch to any kde/gnome
>>> theme you
>>> like.  I have a bunch of KDE themes I snagged and I
>>> never use
>>> bluecurve. ;)
>
> Nate> Agreed here, but first impressions... (GRIN)... the
> installer
> Nate> was just so much cleaner... and remember, I'm used
> to Debian's
> Nate> installer.  (Cough.)
>
> I've seen bluecurve since it came out. I understand why
> they made it
> and thats all great, but I really don't like it.
>
> The last time I tried debian I couldn't even get it to
> install on my
> laptop at the time. I tried for days and had no luck. I
> don't like to
> give up easily, but it just wasn't happening.
>
>> snipp...
>
>>> Now back to downloading the latest knoppix so I can
>>> burn a bunch of
>>> copies and spread them around while I am traveling this
>>> weekend.
>
> Nate> You putting them inside the hotel room Bibles like
> Sean?  Heh
> Nate> heh.  :-) I thought that was hilarious.
>
> I am thinking about it... it's a wonderfull idea.
>
> If everyone stuck a knoppix cd into the gideon bible when
> they
> traveled I think good things would happen. ;)
>
> kevin
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.4 (GNU/Linux)
> Comment: Processed by Mailcrypt 3.5.8
> <http://mailcrypt.sourceforge.net/>
>
> iD8DBQFA5MgI3imCezTjY0ERAqNdAJ9B1q9p//5FxFID3FMoPuVlxhMr7wCdFQFr
> isH6ZZSZILkBZEtSz11bMWk=
> =iQ2l
> -----END PGP SIGNATURE-----
>
> --__--__--
>
> Message: 7
> Date: Thu, 01 Jul 2004 23:05:53 -0400
> From: Angelo Bertolli <angelo at freeshell.org>
> To: clue-tech at clue.denver.co.us
> Subject: Re: [CLUE-Tech] Impressive, Green One
> Reply-To: clue-tech at clue.denver.co.us
>
>
>>If everyone stuck a knoppix cd into the gideon bible when
>> they
>>traveled I think good things would happen. ;)
>>
>>
>>
> If you did that, hardly anyone would find it ;)
>
>
> --__--__--
>
> _______________________________________________
> CLUE-Tech mailing list
> Post messages to: CLUE-Tech at clue.denver.co.us
> Unsubscribe or manage your options:
> http://clue.denver.co.us/mailman/listinfo/clue-tech
>
> End of CLUE-Tech Digest
>




More information about the clue-tech mailing list