Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 180023

Summary: start-stop-daemon starts when --chdir fails ?
Product: Gentoo Linux Reporter: William L. Thomson Jr. (RETIRED) <wltjr>
Component: [OLD] baselayoutAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED WONTFIX    
Severity: normal    
Priority: High    
Version: 2006.1   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 179974    

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.