Bug#292636: cvsd: On startup fialure, the program does not return error code on exit

2005-01-28 Thread Arthur de Jong
On Fri, 2005-01-28 at 14:53 +0200, Jari Aalto wrote:
> The /etc/init.d/cvsd start command does not diplsya error if process
> could not be started. The problem is that cvsd does not return failure
> code on exit.

After cvsd starts, it reads it's command-line parameters and
configuration file and does some internal configuration. After that cvsd
daemonizes itself (detaching it's stdin and stdout) and does all it's
logging through syslog. This means that only command-line and
configuration errors are logged to the terminal on startup (and would
return an error exit code).

This is really a design decision of cvsd (along with dropping privileges
as soon as possible), partly because logging to syslog will report a
constant pid.

> No process has been started and the pid file is lying around:
> 
> $ ls -la /var/run/cvsd.pid 
> -rw-r--r--  1 root root 5 2005-01-28 14:49 /var/run/cvsd.pid

cvsd is almost never in the position to remove it's pidfile since it is
most likely located outside it's chroot jail. This means that cvsd does
not include any code to remove it's pidfile.

In short, I'm not really sure what to do with this bugreport. Do you
have any suggestions?

-- 
-- arthur - [EMAIL PROTECTED] - http://people.debian.org/~adejong --


signature.asc
Description: This is a digitally signed message part


Bug#292636: cvsd: On startup fialure, the program does not return error code on exit

2005-01-28 Thread Jari Aalto
Package: cvsd
Severity: normal


The /etc/init.d/cvsd start command does not diplsya error if process
could not be started. The problem is that cvsd does not return failure
code on exit. An exmaple:

$ start-stop-daemon --start --quiet --pidfile /var/run/cvsd.pid --exec 
/usr/sbin/cvsd -- -f /etc/cvsd/cvsd.conf && echo $?
0

And /var/log/syslog reads:

Jan 28 14:49:26 bongo cvsd[6399]: version 1.0.4 starting
Jan 28 14:49:26 bongo cvsd[6399]: listening on :: 2401
Jan 28 14:49:26 bongo cvsd[6399]: bind() failed: Address already in use
Jan 28 14:49:26 bongo cvsd[6399]: version 1.0.4 bailing out

No process has been started and the pid file is lying around:

$ ls -la /var/run/cvsd.pid 
-rw-r--r--  1 root root 5 2005-01-28 14:49 /var/run/cvsd.pid

-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.9-1-686
Locale: LANG=C, LC_CTYPE=C (charmap=ISO-8859-1) (ignored: LC_ALL set to en_US)


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]