在目标C中编写守护程序 [英] Writing daemon in objective c

查看:111
本文介绍了在目标C中编写守护程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要编写一个守护程序,就像使用目标c在os x上的Windows服务一样.谁能指出一些样本?或指导我如何做?

I need to write a daemon, much like windows service on os x using objective c. Can anyone point to some sample? or guide me about how to do this?

推荐答案

最好以使程序在前台运行的方式编写程序,然后使用外部工具和技术(例如OS X的启动)以使其脱离运行.这使您的程序更易于测试和集成.

It's best to write your program in a way that lets it be run in the foreground, and then use external tools and techniques (such as OS X's launchd) to run them detached. This makes your program easier to test and integrate.

这篇关于在目标C中编写守护程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆