{"id":7280,"date":"2014-06-03T23:34:48","date_gmt":"2014-06-03T23:34:48","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/06\/03\/debugging-osascript-execution-from-within-a-ruby-daemon-collection-of-common-programming-errors\/"},"modified":"2014-06-03T23:34:48","modified_gmt":"2014-06-03T23:34:48","slug":"debugging-osascript-execution-from-within-a-ruby-daemon-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/06\/03\/debugging-osascript-execution-from-within-a-ruby-daemon-collection-of-common-programming-errors\/","title":{"rendered":"Debugging osascript execution from within a ruby daemon-Collection of common programming errors"},"content":{"rendered":"<p>I have a need to frequently run an applescript on my web server. As the server is running rails, and I need access to my models before and after running the script, I thought that a daemon (via the daemons gem) might be appropriate.<\/p>\n<p>In theory this is fairly easy. Below is a simplified example.<\/p>\n<pre><code>#!\/usr\/bin\/env ruby\n\nENV[\"RAILS_ENV\"] ||= \"development\"\n\nrequire File.dirname(__FILE__) + \"\/..\/..\/config\/application\"\nRails.application.require_environment!\n\n$running = true\nSignal.trap(\"TERM\") do \n  $running = false\nend\n\nwhile($running) do\n\n  Rails.logger.info \"Daemon running at #{Time.now}.\\n\"\n\n  # sanity check\n  %x{touch \/foo.txt}\n\n  # this stops working after a while\n  result = %x{\/usr\/bin\/osascript -s o \/path\/to\/the\/script.scpt}\n\n  # under normal operation, my applescript spits out a string result\n  Rails.logger.info \"Result: #{result}.\\n\"\n\n  sleep 30\nend\n<\/code><\/pre>\n<p>For testing purposes I&#8217;ve replaced the (somewhat long and time consuming) production applescript with a one-liner. Here it is, in all its glory:<\/p>\n<pre><code>\"It Worked!\"\n<\/code><\/pre>\n<p>Because applescript treats the last line of the script as a return statement, this string gets passed into my <code>result<\/code> variable and ultimately logged in rails.<\/p>\n<p>This works great &#8211; for a while. Eventually though (typically after several hours) the <code>osascript<\/code> line stops returning results. The daemon <em>is<\/em> still running but the <code>osascript<\/code> line, for all I can tell, is completely failing without explanation.<\/p>\n<p>I can say with certainty that the daemon itself has not died because<\/p>\n<ul>\n<li>The rails log entries appear at correct intervals, and<\/li>\n<li>My sanity check of &#8220;foo.txt&#8221; regularly updates its last modified time stamp.<\/li>\n<\/ul>\n<p>I thought I&#8217;d post an update to this in case anyone out there is having a similar problem. First off, I&#8217;ve found a workaround. Its an ugly hack for sure, but it gets the job done and it doesn&#8217;t crash every 2 hours. What I&#8217;m doing is establishing an ssh connection every time the job is run, which effectively lets the script run on a clean session.<\/p>\n<pre><code>Net::SSH.start('127.0.0.1', 'username', :password =&gt; 'password') do |ssh|\n  result = ssh.exec!('\/usr\/bin\/osascript -s o \/path\/to\/the\/script.scpt') \nend\n<\/code><\/pre>\n<p>And secondly, I&#8217;ve found a large number of crash reports in my ~\/Library\/Logs\/DiagnosticReports directory. More and more I&#8217;m starting to believe that this whole ordeal has to do with some kind of session timeout or expiration.<\/p>\n<pre><code>Process:         osascript [24884]\nPath:            \/usr\/bin\/osascript\nIdentifier:      osascript\nVersion:         ??? (???)\nCode Type:       X86-64 (Native)\nParent Process:  ruby [24868]\n\nDate\/Time:       2011-02-03 16:40:28.526 -0500\nOS Version:      Mac OS X 10.6.6 (10J567)\nReport Version:  6\n\nException Type:  EXC_CRASH (SIGABRT)\nException Codes: 0x0000000000000000, 0x0000000000000000\nCrashed Thread:  0  Dispatch queue: com.apple.main-thread\n\nApplication Specific Information:\nabort() called\nLaunchServices: GetOurLSSessionIDInit() returned err #1, securitySessionID == 0x0, vers=10600000 uid=501 euid=501web1.local] [Se\n\/Users\/greg\/Applescript\/fbbuildutil.scpt\n\nThread 0 Crashed:  Dispatch queue: com.apple.main-thread\n0   libSystem.B.dylib               0x00007fff86fd6616 __kill + 10\n1   libSystem.B.dylib               0x00007fff87076cca abort + 83\n2   com.apple.LaunchServices        0x00007fff82faec84 GetOurLSSessionIDInit() + 298\n3   libSystem.B.dylib               0x00007fff86fa08da pthread_once + 95\n4   com.apple.LaunchServices        0x00007fff82faf29b SetupCoreApplicationServicesCommunicationPort() + 1343\n5   com.apple.LaunchServices        0x00007fff82faf68d getProcessDispatchTable() + 19\n6   com.apple.LaunchServices        0x00007fff82fb17a5 LSClientSideSharedMemory::GetClientSideSharedMemory(LSSessionID, bool) + 187\n7   com.apple.LaunchServices        0x00007fff82fb1e87 _LSCopyApplicationInformationItem + 43\n8   com.apple.AE                    0x00007fff8722b735 aeGetThisProcess() + 49\n9   com.apple.AE                    0x00007fff8722b6df AEEventImpl::initializeData() + 89\n10  com.apple.AE                    0x00007fff8722b5c4 AEEventImpl::AEEventImpl(unsigned int, unsigned int, AEDesc const*, short, int) + 76\n11  com.apple.AE                    0x00007fff8722f33e AECreateAppleEvent + 88\n12  osascript                       0x0000000100001a42 0x100000000 + 6722\n13  osascript                       0x0000000100000fa0 0x100000000 + 4000\n\nThread 1:  Dispatch queue: com.apple.libdispatch-manager\n0   libSystem.B.dylib               0x00007fff86fa116a kevent + 10\n1   libSystem.B.dylib               0x00007fff86fa303d _dispatch_mgr_invoke + 154\n2   libSystem.B.dylib               0x00007fff86fa2d14 _dispatch_queue_invoke + 185\n3   libSystem.B.dylib               0x00007fff86fa283e _dispatch_worker_thread2 + 252\n4   libSystem.B.dylib               0x00007fff86fa2168 _pthread_wqthread + 353\n5   libSystem.B.dylib               0x00007fff86fa2005 start_wqthread + 13\n\nThread 2:\n0   libSystem.B.dylib               0x00007fff86fa1f8a __workq_kernreturn + 10\n1   libSystem.B.dylib               0x00007fff86fa239c _pthread_wqthread + 917\n2   libSystem.B.dylib               0x00007fff86fa2005 start_wqthread + 13\n\nThread 0 crashed with X86 Thread State (64-bit):\n  rax: 0x0000000000000000  rbx: 0x00000000000001f5  rcx: 0x00007fff5fbfb378  rdx: 0x0000000000000000\n  rdi: 0x0000000000006134  rsi: 0x0000000000000006  rbp: 0x00007fff5fbfb390  rsp: 0x00007fff5fbfb378\n   r8: 0x000000010011d740   r9: 0x00000001001fc0a4  r10: 0x00007fff86fd2656  r11: 0x0000000000000202\n  r12: 0x00007fff5fbfb3c0  r13: 0x00007fff703ce328  r14: 0x00007fff82faeb5a  r15: 0x00007fff70c465c0\n  rip: 0x00007fff86fd6616  rfl: 0x0000000000000202  cr2: 0x00000001000f8000\n\nBinary Images:\n       0x100000000 -        0x100002ff7 +osascript ??? (???)  \/usr\/bin\/osascript\n       0x1000f1000 -        0x1000f1fff  com.apple.applescript.component 2.1.2 (2.1.2)  \/System\/Library\/Components\/AppleScript.component\/Contents\/MacOS\/AppleScript\n       0x100419000 -        0x1004adfe7  com.apple.applescript 2.1.2 (2.1.2)  \/System\/Library\/PrivateFrameworks\/AppleScript.framework\/Versions\/A\/AppleScript\n    0x7fff5fc00000 -     0x7fff5fc3bdef  dyld 132.1 (???)  \/usr\/lib\/dyld\n    0x7fff8011d000 -     0x7fff8011efff  liblangid.dylib ??? (???)  \/usr\/lib\/liblangid.dylib\n    0x7fff8016d000 -     0x7fff8046bfe7  com.apple.HIToolbox 1.6.4 (???)  \/System\/Library\/Frameworks\/Carbon.framework\/Versions\/A\/Frameworks\/HIToolbox.framework\/Versions\/A\/HIToolbox\n    0x7fff80472000 -     0x7fff804befff  libauto.dylib ??? (???)  \/usr\/lib\/libauto.dylib\n    0x7fff804bf000 -     0x7fff80574fe7  com.apple.ink.framework 1.3.3 (107)  \/System\/Library\/Frameworks\/Carbon.framework\/Versions\/A\/Frameworks\/Ink.framework\/Versions\/A\/Ink\n    0x7fff8071a000 -     0x7fff80784fe7  libvMisc.dylib 268.0.1 (compatibility 1.0.0)  \/System\/Library\/Frameworks\/Accelerate.framework\/Versions\/A\/Frameworks\/vecLib.framework\/Versions\/A\/libvMisc.dylib\n    0x7fff80791000 -     0x7fff80794ff7  com.apple.securityhi 4.0 (36638)  \/System\/Library\/Frameworks\/Carbon.framework\/Versions\/A\/Frameworks\/SecurityHI.framework\/Versions\/A\/SecurityHI\n    0x7fff80795000 -     0x7fff808aefef  libGLProgrammability.dylib ??? (???)  \/System\/Library\/Frameworks\/OpenGL.framework\/Versions\/A\/Libraries\/libGLProgrammability.dylib\n    0x7fff808b0000 -     0x7fff8092dfef  libstdc++.6.dylib 7.9.0 (compatibility 7.0.0)  \/usr\/lib\/libstdc++.6.dylib\n    0x7fff80949000 -     0x7fff80949ff7  com.apple.ApplicationServices 38 (38)  \/System\/Library\/Frameworks\/ApplicationServices.framework\/Versions\/A\/ApplicationServices\n    0x7fff80a2b000 -     0x7fff80ba2fe7  com.apple.CoreFoundation 6.6.4 (550.42)  \/System\/Library\/Frameworks\/CoreFoundation.framework\/Versions\/A\/CoreFoundation\n    0x7fff80ba3000 -     0x7fff813adfe7  libBLAS.dylib 219.0.0 (compatibility 1.0.0)  \/System\/Library\/Frameworks\/Accelerate.framework\/Versions\/A\/Frameworks\/vecLib.framework\/Versions\/A\/libBLAS.dylib\n    0x7fff813ae000 -     0x7fff813b4ff7  com.apple.DiskArbitration 2.3 (2.3)  \/System\/Library\/Frameworks\/DiskArbitration.framework\/Versions\/A\/DiskArbitration\n    0x7fff813e6000 -     0x7fff813e9ff7  libCoreVMClient.dylib ??? (???)  \/System\/Library\/Frameworks\/OpenGL.framework\/Versions\/A\/Libraries\/libCoreVMClient.dylib\n    0x7fff813ea000 -     0x7fff813fefff  libGL.dylib ??? (???)  \/System\/Library\/Frameworks\/OpenGL.framework\/Versions\/A\/Libraries\/libGL.dylib\n    0x7fff81480000 -     0x7fff814b9fef  libcups.2.dylib 2.8.0 (compatibility 2.0.0)  \/usr\/lib\/libcups.2.dylib\n    0x7fff816aa000 -     0x7fff816f4ff7  com.apple.Metadata 10.6.3 (507.15)  \/System\/Library\/Frameworks\/CoreServices.framework\/Versions\/A\/Frameworks\/Metadata.framework\/Versions\/A\/Metadata\n    0x7fff8185b000 -     0x7fff81876ff7  com.apple.openscripting 1.3.1 (???)  \/System\/Library\/Frameworks\/Carbon.framework\/Versions\/A\/Frameworks\/OpenScripting.framework\/Versions\/A\/OpenScripting\n    0x7fff818b9000 -     0x7fff81901ff7  libvDSP.dylib 268.0.1 (compatibility 1.0.0)  \/System\/Library\/Frameworks\/Accelerate.framework\/Versions\/A\/Frameworks\/vecLib.framework\/Versions\/A\/libvDSP.dylib\n    0x7fff81940000 -     0x7fff8194ffff  com.apple.NetFS 3.2.1 (3.2.1)  \/System\/Library\/Frameworks\/NetFS.framework\/Versions\/A\/NetFS\n    0x7fff81950000 -     0x7fff81a67fef  libxml2.2.dylib 10.3.0 (compatibility 10.0.0)  \/usr\/lib\/libxml2.2.dylib\n    0x7fff81a98000 -     0x7fff81b51fff  libsqlite3.dylib 9.6.0 (compatibility 9.0.0)  \/usr\/lib\/libsqlite3.dylib\n    0x7fff81b52000 -     0x7fff81c07fe7  com.apple.ColorSync 4.6.3 (4.6.3)  \/System\/Library\/Frameworks\/ApplicationServices.framework\/Versions\/A\/Frameworks\/ColorSync.framework\/Versions\/A\/ColorSync\n    0x7fff81c08000 -     0x7fff81c33ff7  libxslt.1.dylib 3.24.0 (compatibility 3.0.0)  \/usr\/lib\/libxslt.1.dylib\n    0x7fff81e28000 -     0x7fff81e59fff  libGLImage.dylib ??? (???)  \/System\/Library\/Frameworks\/OpenGL.framework\/Versions\/A\/Libraries\/libGLImage.dylib\n    0x7fff81e5a000 -     0x7fff81e6cfe7  libsasl2.2.dylib 3.15.0 (compatibility 3.0.0)  \/usr\/lib\/libsasl2.2.dylib\n    0x7fff81e6d000 -     0x7fff81f2aff7  com.apple.CoreServices.OSServices 357 (357)  \/System\/Library\/Frameworks\/CoreServices.framework\/Versions\/A\/Frameworks\/OSServices.framework\/Versions\/A\/OSServices\n    0x7fff81f2b000 -     0x7fff81f30ff7  com.apple.CommonPanels 1.2.4 (91)  \/System\/Library\/Frameworks\/Carbon.framework\/Versions\/A\/Frameworks\/CommonPanels.framework\/Versions\/A\/CommonPanels\n    0x7fff81f47000 -     0x7fff81f6ffff  com.apple.DictionaryServices 1.1.2 (1.1.2)  \/System\/Library\/Frameworks\/CoreServices.framework\/Versions\/A\/Frameworks\/DictionaryServices.framework\/Versions\/A\/DictionaryServices\n    0x7fff81fce000 -     0x7fff81fceff7  com.apple.Carbon 150 (152)  \/System\/Library\/Frameworks\/Carbon.framework\/Versions\/A\/Carbon\n    0x7fff81fe1000 -     0x7fff81fe4fff  com.apple.help 1.3.1 (41)  \/System\/Library\/Frameworks\/Carbon.framework\/Versions\/A\/Frameworks\/Help.framework\/Versions\/A\/Help\n    0x7fff81fe5000 -     0x7fff81ff9ff7  com.apple.speech.synthesis.framework 3.10.35 (3.10.35)  \/System\/Library\/Frameworks\/ApplicationServices.framework\/Versions\/A\/Frameworks\/SpeechSynthesis.framework\/Versions\/A\/SpeechSynthesis\n    0x7fff81ffa000 -     0x7fff8201dfff  com.apple.opencl 12.3 (12.3)  \/System\/Library\/Frameworks\/OpenCL.framework\/Versions\/A\/OpenCL\n    0x7fff8201e000 -     0x7fff82024ff7  com.apple.CommerceCore 1.0 (6)  \/System\/Library\/PrivateFrameworks\/CommerceKit.framework\/Versions\/A\/Frameworks\/CommerceCore.framework\/Versions\/A\/CommerceCore\n    0x7fff82073000 -     0x7fff82088ff7  com.apple.LangAnalysis 1.6.6 (1.6.6)  \/System\/Library\/Frameworks\/ApplicationServices.framework\/Versions\/A\/Frameworks\/LangAnalysis.framework\/Versions\/A\/LangAnalysis\n    0x7fff82107000 -     0x7fff82148fff  com.apple.SystemConfiguration 1.10.5 (1.10.2)  \/System\/Library\/Frameworks\/SystemConfiguration.framework\/Versions\/A\/SystemConfiguration\n    0x7fff82149000 -     0x7fff823cffff  com.apple.security 6.1.1 (37594)  \/System\/Library\/Frameworks\/Security.framework\/Versions\/A\/Security\n    0x7fff825d4000 -     0x7fff825d5ff7  com.apple.audio.units.AudioUnit 1.6.5 (1.6.5)  \/System\/Library\/Frameworks\/AudioUnit.framework\/Versions\/A\/AudioUnit\n    0x7fff825d6000 -     0x7fff825e5fff  com.apple.opengl 1.6.12 (1.6.12)  \/System\/Library\/Frameworks\/OpenGL.framework\/Versions\/A\/OpenGL\n    0x7fff825e6000 -     0x7fff8269cfff  libobjc.A.dylib 227.0.0 (compatibility 1.0.0)  \/usr\/lib\/libobjc.A.dylib\n    0x7fff8269d000 -     0x7fff826fdfe7  com.apple.framework.IOKit 2.0 (???)  \/System\/Library\/Frameworks\/IOKit.framework\/Versions\/A\/IOKit\n    0x7fff8287e000 -     0x7fff828a4fe7  libJPEG.dylib ??? (???)  \/System\/Library\/Frameworks\/ApplicationServices.framework\/Versions\/A\/Frameworks\/ImageIO.framework\/Versions\/A\/Resources\/libJPEG.dylib\n    0x7fff828eb000 -     0x7fff82c1ffff  com.apple.CoreServices.CarbonCore 861.23 (861.23)  \/System\/Library\/Frameworks\/CoreServices.framework\/Versions\/A\/Frameworks\/CarbonCore.framework\/Versions\/A\/CarbonCore\n    0x7fff82ca9000 -     0x7fff82d28fe7  com.apple.audio.CoreAudio 3.2.6 (3.2.6)  \/System\/Library\/Frameworks\/CoreAudio.framework\/Versions\/A\/CoreAudio\n    0x7fff82d29000 -     0x7fff82dd8fff  edu.mit.Kerberos 6.5.10 (6.5.10)  \/System\/Library\/Frameworks\/Kerberos.framework\/Versions\/A\/Kerberos\n    0x7fff82fa2000 -     0x7fff83042fff  com.apple.LaunchServices 362.2 (362.2)  \/System\/Library\/Frameworks\/CoreServices.framework\/Versions\/A\/Frameworks\/LaunchServices.framework\/Versions\/A\/LaunchServices\n    0x7fff83055000 -     0x7fff83213fff  libicucore.A.dylib 40.0.0 (compatibility 1.0.0)  \/usr\/lib\/libicucore.A.dylib\n    0x7fff83214000 -     0x7fff833cbfef  com.apple.ImageIO.framework 3.0.4 (3.0.4)  \/System\/Library\/Frameworks\/ApplicationServices.framework\/Versions\/A\/Frameworks\/ImageIO.framework\/Versions\/A\/ImageIO\n    0x7fff833cc000 -     0x7fff833cdff7  libScreenReader.dylib ??? (???)  \/usr\/lib\/libScreenReader.dylib\n    0x7fff833ce000 -     0x7fff833ceff7  com.apple.CoreServices 44 (44)  \/System\/Library\/Frameworks\/CoreServices.framework\/Versions\/A\/CoreServices\n    0x7fff8340c000 -     0x7fff8340dff7  com.apple.TrustEvaluationAgent 1.1 (1)  \/System\/Library\/PrivateFrameworks\/TrustEvaluationAgent.framework\/Versions\/A\/TrustEvaluationAgent\n    0x7fff8340e000 -     0x7fff83427fff  com.apple.CFOpenDirectory 10.6 (10.6)  \/System\/Library\/Frameworks\/OpenDirectory.framework\/Versions\/A\/Frameworks\/CFOpenDirectory.framework\/Versions\/A\/CFOpenDirectory\n    0x7fff83428000 -     0x7fff834a6fff  com.apple.CoreText 3.5.0 (???)  \/System\/Library\/Frameworks\/ApplicationServices.framework\/Versions\/A\/Frameworks\/CoreText.framework\/Versions\/A\/CoreText\n    0x7fff83730000 -     0x7fff83782ff7  com.apple.HIServices 1.8.2 (???)  \/System\/Library\/Frameworks\/ApplicationServices.framework\/Versions\/A\/Frameworks\/HIServices.framework\/Versions\/A\/HIServices\n    0x7fff8381c000 -     0x7fff83942fff  com.apple.audio.toolbox.AudioToolbox 1.6.5 (1.6.5)  \/System\/Library\/Frameworks\/AudioToolbox.framework\/Versions\/A\/AudioToolbox\n    0x7fff83943000 -     0x7fff83992ff7  com.apple.DirectoryService.PasswordServerFramework 6.0 (6.0)  \/System\/Library\/PrivateFrameworks\/PasswordServer.framework\/Versions\/A\/PasswordServer\n    0x7fff83993000 -     0x7fff839a9fef  libbsm.0.dylib ??? (???)  \/usr\/lib\/libbsm.0.dylib\n    0x7fff839f7000 -     0x7fff83ac9fe7  com.apple.CFNetwork 454.11.5 (454.11.5)  \/System\/Library\/Frameworks\/CoreServices.framework\/Versions\/A\/Frameworks\/CFNetwork.framework\/Versions\/A\/CFNetwork\n    0x7fff83bb1000 -     0x7fff83bb1ff7  com.apple.Accelerate 1.6 (Accelerate 1.6)  \/System\/Library\/Frameworks\/Accelerate.framework\/Versions\/A\/Accelerate\n    0x7fff83bb2000 -     0x7fff83c4cfff  com.apple.ApplicationServices.ATS 4.4 (???)  \/System\/Library\/Frameworks\/ApplicationServices.framework\/Versions\/A\/Frameworks\/ATS.framework\/Versions\/A\/ATS\n    0x7fff83c4d000 -     0x7fff83c63fff  com.apple.ImageCapture 6.0.1 (6.0.1)  \/System\/Library\/Frameworks\/Carbon.framework\/Versions\/A\/Frameworks\/ImageCapture.framework\/Versions\/A\/ImageCapture\n    0x7fff84091000 -     0x7fff841b2fe7  libcrypto.0.9.8.dylib 0.9.8 (compatibility 0.9.8)  \/usr\/lib\/libcrypto.0.9.8.dylib\n    0x7fff841bb000 -     0x7fff841d1fe7  com.apple.MultitouchSupport.framework 207.10 (207.10)  \/System\/Library\/PrivateFrameworks\/MultitouchSupport.framework\/Versions\/A\/MultitouchSupport\n    0x7fff841e4000 -     0x7fff84269ff7  com.apple.print.framework.PrintCore 6.3 (312.7)  \/System\/Library\/Frameworks\/ApplicationServices.framework\/Versions\/A\/Frameworks\/PrintCore.framework\/Versions\/A\/PrintCore\n    0x7fff8426a000 -     0x7fff84607fe7  com.apple.QuartzCore 1.6.3 (227.34)  \/System\/Library\/Frameworks\/QuartzCore.framework\/Versions\/A\/QuartzCore\n    0x7fff8463e000 -     0x7fff8463eff7  com.apple.vecLib 3.6 (vecLib 3.6)  \/System\/Library\/Frameworks\/vecLib.framework\/Versions\/A\/vecLib\n    0x7fff84927000 -     0x7fff84932ff7  com.apple.speech.recognition.framework 3.11.1 (3.11.1)  \/System\/Library\/Frameworks\/Carbon.framework\/Versions\/A\/Frameworks\/SpeechRecognition.framework\/Versions\/A\/SpeechRecognition\n    0x7fff84d5e000 -     0x7fff84d63fff  libGIF.dylib ??? (???)  \/System\/Library\/Frameworks\/ApplicationServices.framework\/Versions\/A\/Frameworks\/ImageIO.framework\/Versions\/A\/Resources\/libGIF.dylib\n    0x7fff84da8000 -     0x7fff851ebfef  libLAPACK.dylib 219.0.0 (compatibility 1.0.0)  \/System\/Library\/Frameworks\/Accelerate.framework\/Versions\/A\/Frameworks\/vecLib.framework\/Versions\/A\/libLAPACK.dylib\n    0x7fff85efd000 -     0x7fff85f1dff7  com.apple.DirectoryService.Framework 3.6 (621.9)  \/System\/Library\/Frameworks\/DirectoryService.framework\/Versions\/A\/DirectoryService\n    0x7fff85f1e000 -     0x7fff85f23fff  libGFXShared.dylib ??? (???)  \/System\/Library\/Frameworks\/OpenGL.framework\/Versions\/A\/Libraries\/libGFXShared.dylib\n    0x7fff85f24000 -     0x7fff85ffeff7  com.apple.vImage 4.0 (4.0)  \/System\/Library\/Frameworks\/Accelerate.framework\/Versions\/A\/Frameworks\/vImage.framework\/Versions\/A\/vImage\n    0x7fff8603a000 -     0x7fff8673706f  com.apple.CoreGraphics 1.545.0 (???)  \/System\/Library\/Frameworks\/ApplicationServices.framework\/Versions\/A\/Frameworks\/CoreGraphics.framework\/Versions\/A\/CoreGraphics\n    0x7fff86738000 -     0x7fff86738ff7  com.apple.Accelerate.vecLib 3.6 (vecLib 3.6)  \/System\/Library\/Frameworks\/Accelerate.framework\/Versions\/A\/Frameworks\/vecLib.framework\/Versions\/A\/vecLib\n    0x7fff8687c000 -     0x7fff868c3ff7  com.apple.coreui 2 (114)  \/System\/Library\/PrivateFrameworks\/CoreUI.framework\/Versions\/A\/CoreUI\n    0x7fff86ab9000 -     0x7fff86b45fef  SecurityFoundation ??? (???)  \/System\/Library\/Frameworks\/SecurityFoundation.framework\/Versions\/A\/SecurityFoundation\n    0x7fff86b46000 -     0x7fff86b63ff7  libPng.dylib ??? (???)  \/System\/Library\/Frameworks\/ApplicationServices.framework\/Versions\/A\/Frameworks\/ImageIO.framework\/Versions\/A\/Resources\/libPng.dylib\n    0x7fff86b89000 -     0x7fff86baafff  libresolv.9.dylib 41.0.0 (compatibility 1.0.0)  \/usr\/lib\/libresolv.9.dylib\n    0x7fff86bab000 -     0x7fff86e2eff7  com.apple.Foundation 6.6.4 (751.42)  \/System\/Library\/Frameworks\/Foundation.framework\/Versions\/C\/Foundation\n    0x7fff86e2f000 -     0x7fff86f6dfff  com.apple.CoreData 102.1 (251)  \/System\/Library\/Frameworks\/CoreData.framework\/Versions\/A\/CoreData\n    0x7fff86f87000 -     0x7fff87148fff  libSystem.B.dylib 125.2.1 (compatibility 1.0.0)  \/usr\/lib\/libSystem.B.dylib\n    0x7fff8718b000 -     0x7fff8718dfff  libRadiance.dylib ??? (???)  \/System\/Library\/Frameworks\/ApplicationServices.framework\/Versions\/A\/Frameworks\/ImageIO.framework\/Versions\/A\/Resources\/libRadiance.dylib\n    0x7fff871de000 -     0x7fff8721ffef  com.apple.QD 3.36 (???)  \/System\/Library\/Frameworks\/ApplicationServices.framework\/Versions\/A\/Frameworks\/QD.framework\/Versions\/A\/QD\n    0x7fff87229000 -     0x7fff87264fff  com.apple.AE 496.4 (496.4)  \/System\/Library\/Frameworks\/CoreServices.framework\/Versions\/A\/Frameworks\/AE.framework\/Versions\/A\/AE\n    0x7fff8728f000 -     0x7fff87293ff7  libmathCommon.A.dylib 315.0.0 (compatibility 1.0.0)  \/usr\/lib\/system\/libmathCommon.A.dylib\n    0x7fff873bd000 -     0x7fff873ceff7  libz.1.dylib 1.2.3 (compatibility 1.0.0)  \/usr\/lib\/libz.1.dylib\n    0x7fff873cf000 -     0x7fff87418fef  libGLU.dylib ??? (???)  \/System\/Library\/Frameworks\/OpenGL.framework\/Versions\/A\/Libraries\/libGLU.dylib\n    0x7fff87419000 -     0x7fff8746eff7  com.apple.framework.familycontrols 2.0.2 (2020)  \/System\/Library\/PrivateFrameworks\/FamilyControls.framework\/Versions\/A\/FamilyControls\n    0x7fff8746f000 -     0x7fff874fffff  com.apple.SearchKit 1.3.0 (1.3.0)  \/System\/Library\/Frameworks\/CoreServices.framework\/Versions\/A\/Frameworks\/SearchKit.framework\/Versions\/A\/SearchKit\n    0x7fff87528000 -     0x7fff875e9fe7  libFontParser.dylib ??? (???)  \/System\/Library\/Frameworks\/ApplicationServices.framework\/Versions\/A\/Frameworks\/ATS.framework\/Versions\/A\/Resources\/libFontParser.dylib\n    0x7fff8766e000 -     0x7fff876bdfef  libTIFF.dylib ??? (???)  \/System\/Library\/Frameworks\/ApplicationServices.framework\/Versions\/A\/Frameworks\/ImageIO.framework\/Versions\/A\/Resources\/libTIFF.dylib\n    0x7fff876be000 -     0x7fff876c4ff7  IOSurface ??? (???)  \/System\/Library\/Frameworks\/IOSurface.framework\/Versions\/A\/IOSurface\n    0x7fff87dce000 -     0x7fff87dd5fff  com.apple.OpenDirectory 10.6 (10.6)  \/System\/Library\/Frameworks\/OpenDirectory.framework\/Versions\/A\/OpenDirectory\n    0x7fff87fba000 -     0x7fff8809ffef  com.apple.DesktopServices 1.5.9 (1.5.9)  \/System\/Library\/PrivateFrameworks\/DesktopServicesPriv.framework\/Versions\/A\/DesktopServicesPriv\n    0x7fff884b9000 -     0x7fff884c7ff7  libkxld.dylib ??? (???)  \/usr\/lib\/system\/libkxld.dylib\n    0x7fff884c8000 -     0x7fff88ebefff  com.apple.AppKit 6.6.7 (1038.35)  \/System\/Library\/Frameworks\/AppKit.framework\/Versions\/C\/AppKit\n    0x7fff890fb000 -     0x7fff89120ff7  com.apple.CoreVideo 1.6.2 (45.6)  \/System\/Library\/Frameworks\/CoreVideo.framework\/Versions\/A\/CoreVideo\n    0x7fff89121000 -     0x7fff89123fff  com.apple.print.framework.Print 6.1 (237.1)  \/System\/Library\/Frameworks\/Carbon.framework\/Versions\/A\/Frameworks\/Print.framework\/Versions\/A\/Print\n    0x7fffffe00000 -     0x7fffffe01fff  libSystem.B.dylib ??? (???)  \/usr\/lib\/libSystem.B.dylib\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I have a need to frequently run an applescript on my web server. As the server is running rails, and I need access to my models before and after running the script, I thought that a daemon (via the daemons gem) might be appropriate. In theory this is fairly easy. Below is a simplified example. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-7280","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7280","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=7280"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7280\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=7280"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=7280"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=7280"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}