我刚从.net开发转到LINUX开发..。我之前对linux有很多经验。
发布于 2009-08-03 08:03:38
- The Unix word for service is Daemon. Regular daemons can be found in /etc/init.d/ and are installed into the runlevel they are supposed to run in by being symlinked from /etc/rc.\* directories.
发布于 2009-08-03 07:56:26
对于1. -是的,可以在mono c#中创建后台服务。服务实际上是一个在后台运行的程序,它不需要键盘和鼠标的输入,也不会直接输出到用户的屏幕上。在创建这样的程序之后,您可以使用nohup./programname运行它&将其设置为后台,并忽略挂起信号(当您注销时发送给正在运行的进程)。
如果您想更好地集成它,那么您必须编写一些额外的脚本来停止、启动、重新启动它,等等(取决于您选择的linux发行版)。
发布于 2009-08-03 08:22:44
至于LINUX (Unix ),您可以使用mono中包含的Mono.UNIX库。尽管作为一般规则,您应该尽可能坚持使用可移植的解决方案,而不是Mono.UNix或p/invoke之类的解决方案。
https://stackoverflow.com/questions/1221110
复制相似问题