launchctl list status 出现异常的解决方法


从stackoverflow上转载一篇文章,讨论了在Mac OS中通过launchctl list发现plist运行的Status出现异常的解决方法,其实就是安装launchcontrol图形工具。

launchcontrol是一款强大的后台服务管理进程launchd辅助工具,能够帮助我们自定义并管理各种System/Global/UserAgents。可以查看程序的运行状态,是否出错,以及非常详细的出错提示信息。


what does launchd status 78 mean?? why my user agent not running??


up vote 7 down vote favorite
1

I want to run a unison sync service running in the background whenever I login. But the status code of my agent is 78. I don't know why, I tried some fix posted online, but it just doesn't work.

What's the problem?? below is the plist file for my service.





    Label
    syncmyproject
    StandardOutPath
    /var/log/syncmyproject.log
    StandardErrorPath
    /var/log/syncmyproject.log
    RunAtLoad
    
    KeepAlive
    
    Debug
    
    EnableGlobbing
    
    ProgramArguments
    
      /usr/local/bin/unison
      -auto
      -batch
      -repeat watch
      ~/home/project
      ~/project
    


share improve this question
 
 
You can grep this file for possible clues as to what's wrong: /var/log/system.log –  Nick  Dec 1 at 19:52

2 Answers

active oldest votes
up vote 11 down vote accepted

I read man launchctl, find 78 means function not implemented. It doesn't help much.

Finally I make it work, actually there were errors in the plist, I recommend to install the brew cask install launchcontrol, which is a gui tool for launchctl, it can help detect errors and trouble shooting.

share improve this answer
 
1  
Thanks for this. launchcontrol helped solve my issue. For the record I had status 78 and my issue was that my script did not start with an interpreter e,g; #!/bin/sh –  getthemike  Feb 26 at 14:37
 
For me the problem was, that the log directory was not accessible by the current user. –  d4Rk  Oct 25 at 10:16



转自:http://stackoverflow.com/questions/1101957/are-there-any-standard-exit-status-codes-in-linux

你可能感兴趣的:(Env,config,User,app)