我可以在哪里或如何将我的代码连接到 TDaemonApplication 上的 Unix 信号(主要是 SIGHUP)?

发布于 2024-09-30 08:41:27 字数 517 浏览 1 评论 0原文

遇到 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

沉睡月亮 2024-10-07 08:41:27

如果(所有)应用程序都需要处理 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文