|
|
Oozing Race Conditions
Although not dangerous, scripts like this rarely work correctly. There is no guarantee that efax will appear in your process listing -- it could have come and gone in less than a second. You also don't know when it is safe to pull a copy of the file from a CUPS directory. A better approach would be to offer a wrapped efax application script that would run instead of the original. The script would then call the original. I would bet that there would be some command line arguments that give you the location of the file to fax, allowing you to safely make copies without fear that the original gets moved or goes away.
Oozing Race Conditions
I've used this script half a dozen times, with 100% success. (Over the last 10 years, I've also used similarly constructed scripts, carefully applied, for unix admin purposes. If you know your target application, and test carefully, scripts like this can be reliable.)
The commenter may not have used common sense when concluding that efax could appear and disappear in less than a 1-second cycle. It it does, then your fax failed to be sent Also, the script doesn't "pull" a copy, it makes a copy, leaving the original intact and unmolested. And further, the script waits until the efax process is running which means the file being sent is safe to copy. In my opinion, a wrapper would be a much worse idea. The next OS update could wipe your wrapper out, and you wouldn't know it until after you lost the chance to copy your next fax.
|
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.05 seconds |
|