我可以在哪里或如何将我的代码连接到 TDaemonApplication 上的 Unix 信号(主要是 SIGHUP)?
遇到 Apache 模块 上的障碍后我转向了我的项目也需要的守护程序应用程序(TCustomDaemonApplication)。
当我意识到没有明显的方法来挂钩 *nix 信号,而我正在寻找的方法是 SIGHUP 来重新加载配置时,我就深入研究了源代码。我发现整个概念是以 Windows 为中心的,并且 *nix 方面的实现非常糟糕。
所以,我的问题是,我是否应该使用自己的 daemonapp.(pp|inc) 并在 Procedure SysInitDaemonApp;< 下包含我自己的 fpSigaction() 调用/code> 还是有我错过的“正确”方法?
After hitting the snag on the Apache module I've turned to a Daemon Application(TCustomDaemonApplication) that is also needed for my project.
Once I realized that there were no obvious way to hook to *nix signals, and the one I'm looking is SIGHUP for config reload, I dived into the source. What I find out is that the whole concept is rather Windows centric and very poorly implemented *nix wise.
So, my question is, should I use a daemonapp.(pp|inc)
of my own and include my own fpSigaction()
calls under Procedure SysInitDaemonApp;
or is there a "proper" way of doing it that I've missed?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果(所有)应用程序都需要处理 hup,请提交错误以便添加它。否则只需添加您自己的。
一般来说,我会尝试尽可能多地使用 daemonapp。虽然有点简单,但它使有关功能的交流变得更加简单,并且将来可能会免费获得一些修复和改进。
If (all) apps are required to handle hup, then file a bug so that it is added. Otherwise just add your own.
In general I would try to use the daemonapp as much as possible. While a tad simplistic, it makes communicating about features a bit simpler, and one might get a few fixes and improvements for free in the future.