_xcsbuildd 用户影响系统重启

最近在自己的mac air上试用了一下OS X Server,然后系统每次重启时,就会提示:

restarting may cause other users logged into this computer to lose unsaved changes

只能再填入账号密码进行重启。

重装了一次OS X系统,也没有解决问题。 不过顺带提一下,OS X系统重装,不会影响到现在安装的所有程序,反而会释放一些硬盘空间。

于是一番google,找到了一篇文章介绍了如何杀死当前登录其他用户的进程,其实这也就是找出当前已经登录的其他用户的方法:

  1. Open up Activity Monitor (/Applications/Utilities/Activity Monitor.app)

  2. Use the drop down menu in the Task bar to change the menu to ‘Other User Processes’ (note: you can use ‘All Processes’ in the menu if you wish, but that is less safe as it makes it possible to accidentally click on your own user process in step 4 below!).

  3. In the filter bar, type loginwindow.

  4. From the list of users that show up, for each one that you wish to log out:

    • click on its row in the Activity Monitor pane to highlight the process

    • press the ‘Quit Process’ icon in the Task bar above

    • from the resulting dialogue window, click ‘Force Quit’

    • supply an Admin password if requested.

在我的电脑上执行上面的操作之后,找出了元凶:_xcsbuildd用户。

然后google之,找到了这篇文章 _xcsbuildd user preventing logout after running OS X Server,描述的现象跟我遇到的一样一样的。文章里提到了解决方法:

sudo xcrun xcscontrol --shutdown # Stops Xcode Server

或者

sudo xcrun xcscontrol --reset # Resets Xcode Server, removing all service data and stopping all services

Last modified on 2015-02-28