Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Launchd Agents, Login Items, and Tiger



In message <email@hidden>, Mike Kobb write
s:
>Okay, thanks much!  It does seem obvious now that I see it! :-)  I can  
>keep track of how quickly the app quits so that I can abort if it  
>seems to be dying on launch, and I guess I'd just have the script  
>check the return value of the program for a "normal" result to  
>terminate the loop if I need to actually shut down the process.

Sure.

TOOFAST=5
x=$(date +%s)
until MyProgram
do
        y=$(date +%s)
        if [ $(expr $y - $x) -lt $TOOFAST ]
        then    exit 1
        fi
        x=$y
done

... And this is why I like launchd, because I've written WAY too many
copies of that program.

-s
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden

References: 
 >Re: Launchd Agents, Login Items, and Tiger (From: Mike Kobb <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.