Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 180023 - start-stop-daemon starts when --chdir fails ?
Summary: start-stop-daemon starts when --chdir fails ?
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 179974
  Show dependency tree
 
Reported: 2007-05-27 15:42 UTC by William L. Thomson Jr. (RETIRED)
Modified: 2007-05-27 16:12 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description William L. Thomson Jr. (RETIRED) gentoo-dev 2007-05-27 15:42:20 UTC
If --chdir is specified to s-s-d and that dir does not exist for one reason or another. s-s-d does not fail to start, it continues on, and spits out OK.

It is spitting out an error, which in this case is
/sbin/start-stop-daemon: Unable to chdir() to /var/tmp/tomcat-6/ (No such file or directory)

Since we are capturing stdout/err in a non-standard way that error ends up in /var/log/tomcat-6/catalina.out instead of on the terminal or etc. Either way s-s-d continues on, and spits out OK as if the service started fine. Which IMHO it should not.

Granted in this case with redirection of output, it would fail with no message. But at least at that point, users could go look at log files or etc. Knowing it failed to start upfront.

See bug 179974 for more info
Comment 1 Roy Marples (RETIRED) gentoo-dev 2007-05-27 16:12:41 UTC
This is already fixed in baselayout-2.

The design of start-daemon-daemon in baselayout-1 does not easily allow a fix for this as the chdir and chroot stuff happens in the child process, which it doesn't track. We could test if the directory existed, but if there was an error changing to it or chrooting to it then the error described here would also happen.