[Nagiosplug-devel] Timeouts in BASH Plugins

Richard Edward Horner rich at richhorner.com
Sat Aug 30 04:01:15 CEST 2008


Ahh! Mike, you're right! Problem solved! Thank you! But I think you meant:

( sleep 6 ; ) </dev/null &>/dev/null &

not

( sleep 6 ; ) </dev/null &>/dev/null

Thanks, Rich(ard)

On Fri, Aug 29, 2008 at 9:25 PM, Mikael Fridh <frimik at gmail.com> wrote:
> On Thu, Aug 28, 2008 at 5:55 PM, Richard Edward Horner
> <rich at richhorner.com> wrote:
>>
>> trap timeout USR1
>>     ( sleep 6 ; ) &
>> trap - USR1
>>
>> If I run that chunk of code locally, its runtime is less than a
>> second. If I run it over NRPE, it's runtime is over 6 seconds because
>> it is not backgrounding the sleep call. It's as if there's a wait
>> somewhere (there's not).
>
> A process won't fully detach unless you redirect all input and output,
> like this:
> ( sleep 6 ; ) </dev/null &>/dev/null
>
> --
> Mike
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________________
> Nagios Plugin Development Mailing List Nagiosplug-devel at lists.sourceforge.net
> Unsubscribe at https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel
> ::: Please include plugins version (-v) and OS when reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
>



-- 
Richard Edward Horner
Engineer / Composer / Electric Guitar Virtuoso
http://richhorner.com




More information about the Devel mailing list