What steps will reproduce the problem?
1. start memcached using Ubuntu/Debian init script:
clint@ubuntu:~$ sudo service memcached start
Starting memcached: memcached.
clint@ubuntu:~$
2. Check process TTY:
clint@ubuntu:~$ ps `pidof memcached`
PID TTY STAT TIME COMMAND
17651 pts/0 Sl 0:00 /usr/bin/memcached -m 64 -p 11211 -u nobody -l
127.0.0.1
3. Repeat without using init script, substituting -d, and notice that there is
no TTY.
clint@ubuntu:~$ sudo /etc/init.d/memcached stop
Stopping memcached: memcached.
clint@ubuntu:~$ /usr/bin/memcached -m 64 -p 11211 -u nobody -l 127.0.0.1 -d
clint@ubuntu:~$ ps `pidof memcached`
PID TTY STAT TIME COMMAND
17672 ? Ssl 0:00 /usr/bin/memcached -m 64 -p 11211 -u nobody -l
127.0.0.1 -d
What is the expected output? What do you see instead?
I would expect a service to drop its TTY's if starting as a daemon.
What version of the product are you using? On what operating system?
Originally reported on memcached 1.2.8, but this is confirmed on v1.4.5
Please provide any additional information below.
This was reported against Ubuntu 9.10 in this bug report:
https://bugs.launchpad.net/ubuntu/+source/memcached/+bug/491685
This patch fixes the problem by employing the same technique the cpan module
Proc::Daemon
uses.
Original issue reported on code.google.com by superama...@gmail.com on 28 May 2010 at 1:14
Original issue reported on code.google.com by
superama...@gmail.com
on 28 May 2010 at 1:14Attachments: