On Sun, Mar 1, 2015 at 8:10 PM, Melkor Lord <melkor.lord at gmail.com> wrote:> What puzzles me is the difference > in behaviour between debug mode and non-debug mode. What could possibly > happen after upsd detaches itself from the calling shell that make upsd fail > to handle SSL stuff while working flawlessly without detaching?I'm thinking it's something here: https://github.com/networkupstools/nut/blob/master/common/common.c#L114> I thought start-stop-daemon was involved because it closes stdin/stdout file > descriptors after exec()'ing the daemon. I tried "--no-close" option to no > avail. After that, I validated the init script working fine with > UPSD_OPTIONS="-D" in /etc/nut/nut.conf.Not strictly the same as closing the file descriptors, but I tried the following: /sbin/upsd -D >/dev/null 2>&1 < /dev/null And it still worked. So I need to recompile with debugging symbols - the Ubuntu packages did not have them. -- - Charles Lepple
On Mon, Mar 2, 2015 at 2:39 AM, Charles Lepple <clepple at gmail.com> wrote:> I thought start-stop-daemon was involved because it closes stdin/stdout > file > > descriptors after exec()'ing the daemon. I tried "--no-close" option to > no > > avail. After that, I validated the init script working fine with > > UPSD_OPTIONS="-D" in /etc/nut/nut.conf. > > Not strictly the same as closing the file descriptors, but I tried the > following: > > /sbin/upsd -D >/dev/null 2>&1 < /dev/null > > And it still worked. So I need to recompile with debugging symbols - > the Ubuntu packages did not have them. >Sorry to bug you again with this issue but is there any improvement on the matter? -- Unix _IS_ user friendly, it's just selective about who its friends are. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20150313/13f4f8d5/attachment-0001.html>
On Mar 12, 2015, at 11:55 PM, Melkor Lord <melkor.lord at gmail.com> wrote:> > On Mon, Mar 2, 2015 at 2:39 AM, Charles Lepple <clepple at gmail.com> wrote: > > > I thought start-stop-daemon was involved because it closes stdin/stdout file > > descriptors after exec()'ing the daemon. I tried "--no-close" option to no > > avail. After that, I validated the init script working fine with > > UPSD_OPTIONS="-D" in /etc/nut/nut.conf. > > Not strictly the same as closing the file descriptors, but I tried the > following: > > /sbin/upsd -D >/dev/null 2>&1 < /dev/null > > And it still worked. So I need to recompile with debugging symbols - > the Ubuntu packages did not have them. > > Sorry to bug you again with this issue but is there any improvement on the matter?No, not yet. Recompiling with debugging symbols did not reveal anything new. We have reached out to the engineer who wrote the NSS code for NUT. -- Charles Lepple clepple at gmail