- xml - AJAX/Jquery XML 解析
- 具有多重继承的 XML 模式
- .net - 枚举序列化 Json 与 XML
- XML 简单类型、简单内容、复杂类型、复杂内容
我需要经常在我的网络服务器上运行 applescript。由于服务器正在运行 rails,并且我需要在运行脚本之前和之后访问我的模型,我认为守护进程(通过 daemons gem )可能是合适的。
理论上这很容易。下面是一个简化的例子。
#!/usr/bin/env ruby
ENV["RAILS_ENV"] ||= "development"
require File.dirname(__FILE__) + "/../../config/application"
Rails.application.require_environment!
$running = true
Signal.trap("TERM") do
$running = false
end
while($running) do
Rails.logger.info "Daemon running at #{Time.now}.\n"
# sanity check
%x{touch /foo.txt}
# this stops working after a while
result = %x{/usr/bin/osascript -s o /path/to/the/script.scpt}
# under normal operation, my applescript spits out a string result
Rails.logger.info "Result: #{result}.\n"
sleep 30
end
出于测试目的,我用一行代码替换了(有点长且耗时的)生产 applescript。这是它的全部荣耀:
"It Worked!"
因为 applescript 将脚本的最后一行视为返回语句,所以该字符串被传递到我的 result
变量中并最终登录到 rails 中。
这在一段时间内效果很好。但最终(通常在几个小时后)osascript
行停止返回结果。守护程序仍在 仍在运行,但据我所知,osascript
行完全失败,没有任何解释。
我可以肯定地说,守护进程本身并没有死,因为
我想我会发布一个更新,以防有人遇到类似的问题。首先,我找到了解决方法。这肯定是一个丑陋的 hack,但它完成了工作并且不会每 2 小时崩溃一次。我正在做的是在每次运行作业时建立一个 ssh 连接,这有效地让脚本在一个干净的 session 上运行。
Net::SSH.start('127.0.0.1', 'username', :password => 'password') do |ssh|
result = ssh.exec!('/usr/bin/osascript -s o /path/to/the/script.scpt')
end
其次,我在 ~/Library/Logs/DiagnosticReports 目录中发现了大量崩溃报告。越来越多的我开始相信这整个考验与某种 session 超时或过期有关。
Process: osascript [24884]
Path: /usr/bin/osascript
Identifier: osascript
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: ruby [24868]
Date/Time: 2011-02-03 16:40:28.526 -0500
OS Version: Mac OS X 10.6.6 (10J567)
Report Version: 6
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Application Specific Information:
abort() called
LaunchServices: GetOurLSSessionIDInit() returned err #1, securitySessionID == 0x0, vers=10600000 uid=501 euid=501web1.local] [Se
/Users/greg/Applescript/fbbuildutil.scpt
Thread 0 Crashed: Dispatch queue: com.apple.main-thread
0 libSystem.B.dylib 0x00007fff86fd6616 __kill + 10
1 libSystem.B.dylib 0x00007fff87076cca abort + 83
2 com.apple.LaunchServices 0x00007fff82faec84 GetOurLSSessionIDInit() + 298
3 libSystem.B.dylib 0x00007fff86fa08da pthread_once + 95
4 com.apple.LaunchServices 0x00007fff82faf29b SetupCoreApplicationServicesCommunicationPort() + 1343
5 com.apple.LaunchServices 0x00007fff82faf68d getProcessDispatchTable() + 19
6 com.apple.LaunchServices 0x00007fff82fb17a5 LSClientSideSharedMemory::GetClientSideSharedMemory(LSSessionID, bool) + 187
7 com.apple.LaunchServices 0x00007fff82fb1e87 _LSCopyApplicationInformationItem + 43
8 com.apple.AE 0x00007fff8722b735 aeGetThisProcess() + 49
9 com.apple.AE 0x00007fff8722b6df AEEventImpl::initializeData() + 89
10 com.apple.AE 0x00007fff8722b5c4 AEEventImpl::AEEventImpl(unsigned int, unsigned int, AEDesc const*, short, int) + 76
11 com.apple.AE 0x00007fff8722f33e AECreateAppleEvent + 88
12 osascript 0x0000000100001a42 0x100000000 + 6722
13 osascript 0x0000000100000fa0 0x100000000 + 4000
Thread 1: Dispatch queue: com.apple.libdispatch-manager
0 libSystem.B.dylib 0x00007fff86fa116a kevent + 10
1 libSystem.B.dylib 0x00007fff86fa303d _dispatch_mgr_invoke + 154
2 libSystem.B.dylib 0x00007fff86fa2d14 _dispatch_queue_invoke + 185
3 libSystem.B.dylib 0x00007fff86fa283e _dispatch_worker_thread2 + 252
4 libSystem.B.dylib 0x00007fff86fa2168 _pthread_wqthread + 353
5 libSystem.B.dylib 0x00007fff86fa2005 start_wqthread + 13
Thread 2:
0 libSystem.B.dylib 0x00007fff86fa1f8a __workq_kernreturn + 10
1 libSystem.B.dylib 0x00007fff86fa239c _pthread_wqthread + 917
2 libSystem.B.dylib 0x00007fff86fa2005 start_wqthread + 13
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000000 rbx: 0x00000000000001f5 rcx: 0x00007fff5fbfb378 rdx: 0x0000000000000000
rdi: 0x0000000000006134 rsi: 0x0000000000000006 rbp: 0x00007fff5fbfb390 rsp: 0x00007fff5fbfb378
r8: 0x000000010011d740 r9: 0x00000001001fc0a4 r10: 0x00007fff86fd2656 r11: 0x0000000000000202
r12: 0x00007fff5fbfb3c0 r13: 0x00007fff703ce328 r14: 0x00007fff82faeb5a r15: 0x00007fff70c465c0
rip: 0x00007fff86fd6616 rfl: 0x0000000000000202 cr2: 0x00000001000f8000
Binary Images:
0x100000000 - 0x100002ff7 +osascript ??? (???) <1B4A05C4-8772-DCFD-444F-31FEE356E299> /usr/bin/osascript
0x1000f1000 - 0x1000f1fff com.apple.applescript.component 2.1.2 (2.1.2) <C621AB4A-9C10-7F1D-6B4E-0B15373D5C59> /System/Library/Components/AppleScript.component/Contents/MacOS/AppleScript
0x100419000 - 0x1004adfe7 com.apple.applescript 2.1.2 (2.1.2) <E9C125A4-8743-6BF8-5A05-BE85778D4158> /System/Library/PrivateFrameworks/AppleScript.framework/Versions/A/AppleScript
0x7fff5fc00000 - 0x7fff5fc3bdef dyld 132.1 (???) <486E6C61-1197-CC7C-2197-82CE505102D7> /usr/lib/dyld
0x7fff8011d000 - 0x7fff8011efff liblangid.dylib ??? (???) <EA4D1607-2BD5-2EE2-2A3B-632EEE5A444D> /usr/lib/liblangid.dylib
0x7fff8016d000 - 0x7fff8046bfe7 com.apple.HIToolbox 1.6.4 (???) <263AD497-F4CC-9610-E7D3-B95CF6F02030> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox
0x7fff80472000 - 0x7fff804befff libauto.dylib ??? (???) <F7221B46-DC4F-3153-CE61-7F52C8C293CF> /usr/lib/libauto.dylib
0x7fff804bf000 - 0x7fff80574fe7 com.apple.ink.framework 1.3.3 (107) <8C36373C-5473-3A6A-4972-BC29D504250F> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framework/Versions/A/Ink
0x7fff8071a000 - 0x7fff80784fe7 libvMisc.dylib 268.0.1 (compatibility 1.0.0) <AF0EA96D-000F-8C12-B952-CB7E00566E08> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvMisc.dylib
0x7fff80791000 - 0x7fff80794ff7 com.apple.securityhi 4.0 (36638) <87868A3E-9341-1078-F00C-5E5972F01A4A> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI.framework/Versions/A/SecurityHI
0x7fff80795000 - 0x7fff808aefef libGLProgrammability.dylib ??? (???) <4F2DC233-7DD2-1204-CAA5-3E6524F0AB75> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLProgrammability.dylib
0x7fff808b0000 - 0x7fff8092dfef libstdc++.6.dylib 7.9.0 (compatibility 7.0.0) <35ECA411-2C08-FD7D-11B1-1B7A04921A5C> /usr/lib/libstdc++.6.dylib
0x7fff80949000 - 0x7fff80949ff7 com.apple.ApplicationServices 38 (38) <10A0B9E9-4988-03D4-FC56-DDE231A02C63> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
0x7fff80a2b000 - 0x7fff80ba2fe7 com.apple.CoreFoundation 6.6.4 (550.42) <770C572A-CF70-168F-F43C-242B9114FCB5> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
0x7fff80ba3000 - 0x7fff813adfe7 libBLAS.dylib 219.0.0 (compatibility 1.0.0) <FC941ECB-71D0-FAE3-DCBF-C5A619E594B8> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
0x7fff813ae000 - 0x7fff813b4ff7 com.apple.DiskArbitration 2.3 (2.3) <857F6E43-1EF4-7D53-351B-10DE0A8F992A> /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration
0x7fff813e6000 - 0x7fff813e9ff7 libCoreVMClient.dylib ??? (???) <609598E6-195D-E5D4-3B92-AE8D9768829C> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCoreVMClient.dylib
0x7fff813ea000 - 0x7fff813fefff libGL.dylib ??? (???) <1EB1BD0F-C17F-55DF-B8B4-8E9CF99359D4> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
0x7fff81480000 - 0x7fff814b9fef libcups.2.dylib 2.8.0 (compatibility 2.0.0) <561D0DCB-47AD-A12C-9066-70E4CBAD331C> /usr/lib/libcups.2.dylib
0x7fff816aa000 - 0x7fff816f4ff7 com.apple.Metadata 10.6.3 (507.15) <5170FCE0-ED6C-2E3E-AB28-1DDE3F628FC5> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata
0x7fff8185b000 - 0x7fff81876ff7 com.apple.openscripting 1.3.1 (???) <9D50701D-54AC-405B-CC65-026FCB28258B> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenScripting.framework/Versions/A/OpenScripting
0x7fff818b9000 - 0x7fff81901ff7 libvDSP.dylib 268.0.1 (compatibility 1.0.0) <98FC4457-F405-0262-00F7-56119CA107B6> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvDSP.dylib
0x7fff81940000 - 0x7fff8194ffff com.apple.NetFS 3.2.1 (3.2.1) <E5D33870-27D2-E50B-9B35-16AA50369733> /System/Library/Frameworks/NetFS.framework/Versions/A/NetFS
0x7fff81950000 - 0x7fff81a67fef libxml2.2.dylib 10.3.0 (compatibility 10.0.0) <B2FB9DA8-6EC9-FFBC-C919-C022B9CBEB73> /usr/lib/libxml2.2.dylib
0x7fff81a98000 - 0x7fff81b51fff libsqlite3.dylib 9.6.0 (compatibility 9.0.0) <2C5ED312-E646-9ADE-73A9-6199A2A43150> /usr/lib/libsqlite3.dylib
0x7fff81b52000 - 0x7fff81c07fe7 com.apple.ColorSync 4.6.3 (4.6.3) <5A7360A8-D495-1E8D-C4B4-A363AF989ADE> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSync.framework/Versions/A/ColorSync
0x7fff81c08000 - 0x7fff81c33ff7 libxslt.1.dylib 3.24.0 (compatibility 3.0.0) <87A0B228-B24A-C426-C3FB-B40D7258DD49> /usr/lib/libxslt.1.dylib
0x7fff81e28000 - 0x7fff81e59fff libGLImage.dylib ??? (???) <1A8E58CF-FA2F-14F7-A097-D34EEA8A7D03> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage.dylib
0x7fff81e5a000 - 0x7fff81e6cfe7 libsasl2.2.dylib 3.15.0 (compatibility 3.0.0) <76B83C8D-8EFE-4467-0F75-275648AFED97> /usr/lib/libsasl2.2.dylib
0x7fff81e6d000 - 0x7fff81f2aff7 com.apple.CoreServices.OSServices 357 (357) <7B22626F-D544-1955-CC53-240F4CACEB4A> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices
0x7fff81f2b000 - 0x7fff81f30ff7 com.apple.CommonPanels 1.2.4 (91) <4D84803B-BD06-D80E-15AE-EFBE43F93605> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPanels.framework/Versions/A/CommonPanels
0x7fff81f47000 - 0x7fff81f6ffff com.apple.DictionaryServices 1.1.2 (1.1.2) <E9269069-93FA-2B71-F9BA-FDDD23C4A65E> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/DictionaryServices.framework/Versions/A/DictionaryServices
0x7fff81fce000 - 0x7fff81fceff7 com.apple.Carbon 150 (152) <191B4F4B-8D06-796B-CA0C-782F06DD7BC7> /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
0x7fff81fe1000 - 0x7fff81fe4fff com.apple.help 1.3.1 (41) <54B79BA2-B71B-268E-8752-5C8EE00E49E4> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.framework/Versions/A/Help
0x7fff81fe5000 - 0x7fff81ff9ff7 com.apple.speech.synthesis.framework 3.10.35 (3.10.35) <621B7415-A0B9-07A7-F313-36BEEDD7B132> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis
0x7fff81ffa000 - 0x7fff8201dfff com.apple.opencl 12.3 (12.3) <D30A45FC-4520-45AF-3CA5-092313DB5D54> /System/Library/Frameworks/OpenCL.framework/Versions/A/OpenCL
0x7fff8201e000 - 0x7fff82024ff7 com.apple.CommerceCore 1.0 (6) <E8A1144C-5666-9840-4729-256FE69CDBDB> /System/Library/PrivateFrameworks/CommerceKit.framework/Versions/A/Frameworks/CommerceCore.framework/Versions/A/CommerceCore
0x7fff82073000 - 0x7fff82088ff7 com.apple.LangAnalysis 1.6.6 (1.6.6) <1AE1FE8F-2204-4410-C94E-0E93B003BEDA> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LangAnalysis.framework/Versions/A/LangAnalysis
0x7fff82107000 - 0x7fff82148fff com.apple.SystemConfiguration 1.10.5 (1.10.2) <FB39F09C-57BB-D8CC-348D-93E00C602F7D> /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration
0x7fff82149000 - 0x7fff823cffff com.apple.security 6.1.1 (37594) <1B4E1ABD-1BB3-DA49-F574-0EEB23E73C6A> /System/Library/Frameworks/Security.framework/Versions/A/Security
0x7fff825d4000 - 0x7fff825d5ff7 com.apple.audio.units.AudioUnit 1.6.5 (1.6.5) <14F14B5E-9287-BC36-0C3F-6592E6696CD4> /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit
0x7fff825d6000 - 0x7fff825e5fff com.apple.opengl 1.6.12 (1.6.12) <DE3F0528-7759-CDFD-A2CF-C51D3C9C8B39> /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL
0x7fff825e6000 - 0x7fff8269cfff libobjc.A.dylib 227.0.0 (compatibility 1.0.0) <99CB3A0F-64CF-1D16-70CD-8AED2EF06C30> /usr/lib/libobjc.A.dylib
0x7fff8269d000 - 0x7fff826fdfe7 com.apple.framework.IOKit 2.0 (???) <D107CB8A-5182-3AC4-35D0-07068A695C05> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
0x7fff8287e000 - 0x7fff828a4fe7 libJPEG.dylib ??? (???) <DFA5DAC2-D1C6-D5ED-F95D-AC185E98B6E7> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib
0x7fff828eb000 - 0x7fff82c1ffff com.apple.CoreServices.CarbonCore 861.23 (861.23) <96465459-6536-3FD7-7504-B59D0390EEC5> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore
0x7fff82ca9000 - 0x7fff82d28fe7 com.apple.audio.CoreAudio 3.2.6 (3.2.6) <6D8AD3F7-409D-512C-C5BE-66C64D1B8F3E> /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio
0x7fff82d29000 - 0x7fff82dd8fff edu.mit.Kerberos 6.5.10 (6.5.10) <6A159CD8-5C02-4528-C36F-6AFBFD61576B> /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos
0x7fff82fa2000 - 0x7fff83042fff com.apple.LaunchServices 362.2 (362.2) <A8EDC37C-1D40-5ED0-49BE-90EF110A6B3A> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices
0x7fff83055000 - 0x7fff83213fff libicucore.A.dylib 40.0.0 (compatibility 1.0.0) <781E7B63-2AD0-E9BA-927C-4521DB616D02> /usr/lib/libicucore.A.dylib
0x7fff83214000 - 0x7fff833cbfef com.apple.ImageIO.framework 3.0.4 (3.0.4) <EE9DFBD6-6354-7C5A-F4C7-5FF782A7D992> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO
0x7fff833cc000 - 0x7fff833cdff7 libScreenReader.dylib ??? (???) <D98F32A6-4729-8040-AE06-76D2F4CF9BBB> /usr/lib/libScreenReader.dylib
0x7fff833ce000 - 0x7fff833ceff7 com.apple.CoreServices 44 (44) <DC7400FB-851E-7B8A-5BF6-6F50094302FB> /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
0x7fff8340c000 - 0x7fff8340dff7 com.apple.TrustEvaluationAgent 1.1 (1) <5952A9FA-BC2B-16EF-91A7-43902A5C07B6> /System/Library/PrivateFrameworks/TrustEvaluationAgent.framework/Versions/A/TrustEvaluationAgent
0x7fff8340e000 - 0x7fff83427fff com.apple.CFOpenDirectory 10.6 (10.6) <CCF79716-7CC6-2520-C6EB-A4F56AD0A207> /System/Library/Frameworks/OpenDirectory.framework/Versions/A/Frameworks/CFOpenDirectory.framework/Versions/A/CFOpenDirectory
0x7fff83428000 - 0x7fff834a6fff com.apple.CoreText 3.5.0 (???) <4D5C7932-293B-17FF-7309-B580BB1953EA> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreText.framework/Versions/A/CoreText
0x7fff83730000 - 0x7fff83782ff7 com.apple.HIServices 1.8.2 (???) <7C91D07D-FA20-0882-632F-0CAE4FAC2B79> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices
0x7fff8381c000 - 0x7fff83942fff com.apple.audio.toolbox.AudioToolbox 1.6.5 (1.6.5) <B51023BB-A5C9-3C65-268B-6B86B901BB2C> /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox
0x7fff83943000 - 0x7fff83992ff7 com.apple.DirectoryService.PasswordServerFramework 6.0 (6.0) <FE549581-6A40-BD28-24A4-68FA0B616780> /System/Library/PrivateFrameworks/PasswordServer.framework/Versions/A/PasswordServer
0x7fff83993000 - 0x7fff839a9fef libbsm.0.dylib ??? (???) <42D3023A-A1F7-4121-6417-FCC6B51B3E90> /usr/lib/libbsm.0.dylib
0x7fff839f7000 - 0x7fff83ac9fe7 com.apple.CFNetwork 454.11.5 (454.11.5) <5D68598D-C138-C8B6-B6AC-B1F48B01E021> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwork.framework/Versions/A/CFNetwork
0x7fff83bb1000 - 0x7fff83bb1ff7 com.apple.Accelerate 1.6 (Accelerate 1.6) <15DF8B4A-96B2-CB4E-368D-DEC7DF6B62BB> /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate
0x7fff83bb2000 - 0x7fff83c4cfff com.apple.ApplicationServices.ATS 4.4 (???) <395849EE-244A-7323-6CBA-E71E3B722984> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS
0x7fff83c4d000 - 0x7fff83c63fff com.apple.ImageCapture 6.0.1 (6.0.1) <09ABF2E9-D110-71A9-4A6F-8A61B683E936> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageCapture.framework/Versions/A/ImageCapture
0x7fff84091000 - 0x7fff841b2fe7 libcrypto.0.9.8.dylib 0.9.8 (compatibility 0.9.8) <48AEAFE1-21F4-B3C8-4199-35AD5E8D0613> /usr/lib/libcrypto.0.9.8.dylib
0x7fff841bb000 - 0x7fff841d1fe7 com.apple.MultitouchSupport.framework 207.10 (207.10) <458F0259-6EDC-16BA-E6AA-1CEED002D188> /System/Library/PrivateFrameworks/MultitouchSupport.framework/Versions/A/MultitouchSupport
0x7fff841e4000 - 0x7fff84269ff7 com.apple.print.framework.PrintCore 6.3 (312.7) <CDFE82DD-D811-A091-179F-6E76069B432D> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/PrintCore
0x7fff8426a000 - 0x7fff84607fe7 com.apple.QuartzCore 1.6.3 (227.34) <C4AABD56-8C93-BAD0-4B27-7E9A2F0EAEE4> /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore
0x7fff8463e000 - 0x7fff8463eff7 com.apple.vecLib 3.6 (vecLib 3.6) <96FB6BAD-5568-C4E0-6FA7-02791A58B584> /System/Library/Frameworks/vecLib.framework/Versions/A/vecLib
0x7fff84927000 - 0x7fff84932ff7 com.apple.speech.recognition.framework 3.11.1 (3.11.1) <3D65E89B-FFC6-4AAF-D5CC-104F967C8131> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechRecognition.framework/Versions/A/SpeechRecognition
0x7fff84d5e000 - 0x7fff84d63fff libGIF.dylib ??? (???) <A7BF2D68-F489-720C-E5A9-DC2B24DC5A21> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libGIF.dylib
0x7fff84da8000 - 0x7fff851ebfef libLAPACK.dylib 219.0.0 (compatibility 1.0.0) <0CC61C98-FF51-67B3-F3D8-C5E430C201A9> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib
0x7fff85efd000 - 0x7fff85f1dff7 com.apple.DirectoryService.Framework 3.6 (621.9) <E7AFAAFA-8221-585B-85D0-171ADC490825> /System/Library/Frameworks/DirectoryService.framework/Versions/A/DirectoryService
0x7fff85f1e000 - 0x7fff85f23fff libGFXShared.dylib ??? (???) <991F8197-FD06-2AF1-F99B-E448ED4FB2AC> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGFXShared.dylib
0x7fff85f24000 - 0x7fff85ffeff7 com.apple.vImage 4.0 (4.0) <354F34BF-B221-A3C9-2CA7-9BE5E14AD5AD> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.framework/Versions/A/vImage
0x7fff8603a000 - 0x7fff8673706f com.apple.CoreGraphics 1.545.0 (???) <356D59D6-1DD1-8BFF-F9B3-1CE51D2F1EC7> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics
0x7fff86738000 - 0x7fff86738ff7 com.apple.Accelerate.vecLib 3.6 (vecLib 3.6) <4CCE5D69-F1B3-8FD3-1483-E0271DB2CCF3> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/vecLib
0x7fff8687c000 - 0x7fff868c3ff7 com.apple.coreui 2 (114) <923E33CC-83FC-7D35-5603-FB8F348EE34B> /System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI
0x7fff86ab9000 - 0x7fff86b45fef SecurityFoundation ??? (???) <F43FDB02-CAA5-F8FF-C8D7-6665E7403ECE> /System/Library/Frameworks/SecurityFoundation.framework/Versions/A/SecurityFoundation
0x7fff86b46000 - 0x7fff86b63ff7 libPng.dylib ??? (???) <667C3883-32A5-CCCC-8624-972B5DFD8EA4> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib
0x7fff86b89000 - 0x7fff86baafff libresolv.9.dylib 41.0.0 (compatibility 1.0.0) <9F322F47-0584-CB7D-5B73-9EBD670851CD> /usr/lib/libresolv.9.dylib
0x7fff86bab000 - 0x7fff86e2eff7 com.apple.Foundation 6.6.4 (751.42) <AF1E3050-3503-8714-8274-EA6BD6BE8A22> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
0x7fff86e2f000 - 0x7fff86f6dfff com.apple.CoreData 102.1 (251) <9DFE798D-AA52-6A9A-924A-DA73CB94D81A> /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData
0x7fff86f87000 - 0x7fff87148fff libSystem.B.dylib 125.2.1 (compatibility 1.0.0) <F00A8B2F-84A0-0868-1047-3A13F9114864> /usr/lib/libSystem.B.dylib
0x7fff8718b000 - 0x7fff8718dfff libRadiance.dylib ??? (???) <6C974488-62D2-71BA-A45E-C764A0AF7354> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib
0x7fff871de000 - 0x7fff8721ffef com.apple.QD 3.36 (???) <5DC41E81-32C9-65B2-5528-B33E934D5BB4> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/QD
0x7fff87229000 - 0x7fff87264fff com.apple.AE 496.4 (496.4) <55AAD5CA-7160-7899-1C68-562ED8160DF7> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE
0x7fff8728f000 - 0x7fff87293ff7 libmathCommon.A.dylib 315.0.0 (compatibility 1.0.0) <95718673-FEEE-B6ED-B127-BCDBDB60D4E5> /usr/lib/system/libmathCommon.A.dylib
0x7fff873bd000 - 0x7fff873ceff7 libz.1.dylib 1.2.3 (compatibility 1.0.0) <97019C74-161A-3488-41EC-A6CA8738418C> /usr/lib/libz.1.dylib
0x7fff873cf000 - 0x7fff87418fef libGLU.dylib ??? (???) <CCE779A9-2467-A5AA-A558-691E43A1105F> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib
0x7fff87419000 - 0x7fff8746eff7 com.apple.framework.familycontrols 2.0.2 (2020) <A3CFF697-B9DB-A7E5-3B39-9DA9B34F0595> /System/Library/PrivateFrameworks/FamilyControls.framework/Versions/A/FamilyControls
0x7fff8746f000 - 0x7fff874fffff com.apple.SearchKit 1.3.0 (1.3.0) <4175DC31-1506-228A-08FD-C704AC9DF642> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit
0x7fff87528000 - 0x7fff875e9fe7 libFontParser.dylib ??? (???) <8B12D37E-3A95-5A73-509C-3AA991E0C546> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontParser.dylib
0x7fff8766e000 - 0x7fff876bdfef libTIFF.dylib ??? (???) <176B52ED-4F6C-D0C2-EABC-C032BFC3DFAA> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib
0x7fff876be000 - 0x7fff876c4ff7 IOSurface ??? (???) <EAD87C9F-BADC-7116-4ADD-0B0679459D24> /System/Library/Frameworks/IOSurface.framework/Versions/A/IOSurface
0x7fff87dce000 - 0x7fff87dd5fff com.apple.OpenDirectory 10.6 (10.6) <4200CFB0-DBA1-62B8-7C7C-91446D89551F> /System/Library/Frameworks/OpenDirectory.framework/Versions/A/OpenDirectory
0x7fff87fba000 - 0x7fff8809ffef com.apple.DesktopServices 1.5.9 (1.5.9) <27890B2C-0CD2-7C27-9D0C-D5952C5E8438> /System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/DesktopServicesPriv
0x7fff884b9000 - 0x7fff884c7ff7 libkxld.dylib ??? (???) <27713C39-0E51-8F5A-877B-C5539C96A520> /usr/lib/system/libkxld.dylib
0x7fff884c8000 - 0x7fff88ebefff com.apple.AppKit 6.6.7 (1038.35) <9F4DF818-9DB9-98DA-490C-EF29EA757A97> /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
0x7fff890fb000 - 0x7fff89120ff7 com.apple.CoreVideo 1.6.2 (45.6) <E138C8E7-3CB6-55A9-0A2C-B73FE63EA288> /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo
0x7fff89121000 - 0x7fff89123fff com.apple.print.framework.Print 6.1 (237.1) <CA8564FB-B366-7413-B12E-9892DA3C6157> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.framework/Versions/A/Print
0x7fffffe00000 - 0x7fffffe01fff libSystem.B.dylib ??? (???) <F00A8B2F-84A0-0868-1047-3A13F9114864> /usr/lib/libSystem.B.dylib
最佳答案
我通过测试发现了我们的问题。我有一个问题要问你,你是如何开始剧本的?它是从登录机器并在 Mac OSX 桌面屏幕中启动终端启动的吗?或者您是通过 ssh 连接到 Mac 并从那里启动它。
在我们尝试使用窗口管理器 (firefox) 的守护程序上,如果我们通过登录用户的 Terminal.app 启动它。它会工作得很好。如果我们 ssh 进入以启动脚本(当您使用 Capistrano 启动它时会发生这种情况)它会正常工作,直到该 ssh session 停止。在控制台中,您可以看到日志:
2/7/11 8:32:13 PM com.apple.SecurityServer[22] Session 0x22058d0 destroyed
2/7/11 8:32:13 PM com.apple.SecurityServer[22] Session 0x22058d0 dead
2/7/11 8:32:13 PM com.apple.SecurityServer[22] Killing auth hosts
这发生在我们终止 SSH session 之后。终止后,我们会像您一样收到错误:
abort() called
LaunchServices: GetOurLSSessionIDInit() returned err #1,
securitySessionID == 0x0, vers=10600000 uid=501 euid=501
我们现在有一个 LaunchAgent,而不是通过 ssh 启动脚本,它将基于带有 ~/jobs/目录的 WatchPaths 启动脚本。它运行良好,我们仍然可以使用 capistrano 重新启动服务器。
我会在您的日志中查看 SecurityServer 是否在脚本失败时立即销毁 session 。如果是这样,那么也许您可以找出导致超时的原因。
关于ruby-on-rails - 从 ruby 守护进程中调试 osascript 执行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4798150/
我有一个“有趣”的问题,即以两种不同的方式运行 wine 会导致: $> wine --version /Applications/Wine.app/Contents/Resources/bin/wi
我制作了这个网络抓取工具来获取网页中的表格。我使用 puppeteer (不知道 crontab 有问题)、Python 进行清理并处理数据库的输出 但令我惊讶的是,当我执行它时 */50 * * *
JavaScript 是否被调用或执行取决于什么?准确地说,我有两个函数,它们都以相同的方式调用: [self.mapView stringByEvaluatingJavaScriptFromStri
我目前正在使用 python 做一个机器学习项目(这里是初学者,从头开始学习一切)。 只是想知道 statsmodels 的 OLS 和 scikit 的 PooledOlS 使用我拥有的相同面板数据
在使用集成对象模型 (IOM) 后,我可以执行 SAS 代码并将 SAS 数据集读入 .Net/C# 数据集 here . 只是好奇,使用 .Net 作为 SAS 服务器的客户端与使用 Enterpr
有一些直接的 jQuery 在单击时隐藏打开的 div 未显示,但仍将高度添加到导航中以使其看起来好像要掉下来了。 这个脚本工作正常: $(document).ready(funct
这个问题已经有答案了: How do I compare strings in Java? (23 个回答) 已关闭 4 年前。 这里是 Java 新手,我正在使用 NetBeans 尝试一些简单的代
如果我将它切换到 Python 2.x,它执行 10。这是为什么? 训练逻辑回归模型 import keras.backend as
我有两个脚本,它们包含在 HTML 正文中。在第一个脚本中,我初始化一个 JS 对象,该对象在第二个脚本标记中引用。 ... obj.a = 1000; obj.
每当我运行该方法时,我都会收到一个带有数字的错误 以下是我的代码。 public String getAccount() { String s = "Listing the accounts";
我已经用 do~while(true) 创建了我的菜单;但是每次用户输入一个数字时,它不会运行程序,而是再次显示菜单!你怎么看? //我的主要方法 public static void main(St
执行命令后,如何让IPython通知我?我可以使用铃声/警报还是通过弹出窗口获取它?我正在OS X 10.8.5的iTerm上运行Anaconda。 最佳答案 使用最新版本的iTerm,您可以在she
您好,我刚刚使用菜单栏为 Swing 编写了代码。但是问题出现在运行中。我输入: javac Menu.java java Menu 它没有给出任何错误,但 GUI 没有显示。这是我的源代码以供引用:
我觉得这里缺少明显的东西,但是我看不到它写在任何地方。 我使用Authenticode证书对可执行文件进行签名,但是当我开始学习有关它的更多信息时,我对原样的值(value)提出了质疑。 签名的exe
我正在设计一个应用程序,它使用 DataTables 中的预定义库来创建数据表。我想对数据表执行删除操作,为此应在按钮单击事件上执行 java 脚本。 $(document).ready(functi
我是 Haskell 新手,如果有人愿意帮助我,我会很高兴!我试图让这个程序与 do while 循环一起工作。 第二个 getLine 命令的结果被放入变量 goGlenn 中,如果 goGlenn
我有一个用 swing 实现迷你游戏的程序,在主类中我有一个循环,用于监听游戏 map 中的 boolean 值。使用 while 实现的循环不会执行一条指令,如果它是唯一的一条指令,我不知道为什么。
我正在尝试开发一个连接到 Oracle 数据库并执行函数的 Java 应用程序。如果我在 Eclipse 中运行该应用程序,它可以工作,但是当我尝试在 Windows 命令提示符中运行 .jar 时,
我正在阅读有关 Java 中的 Future 和 javascript 中的 Promises 的内容。下面是我作为示例编写的代码。我的问题是分配给 future 的任务什么时候开始执行? 当如下行创
我有一个常见的情况,您有两个变量(xSpeed 和 ySpeed),当它们低于 minSpeed 时,我想将它们独立设置为零,并在它们都为零时退出。 最有效的方法是什么?目前我有两种方法(方法2更干净
我是一名优秀的程序员,十分优秀!