Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 129 by techadvise: start-memcached needs to call setsid()
http://code.google.com/p/memcached/issues/detail?id=129

What steps will reproduce the problem?
1.  Start a memcached with the included start-memcached perl script from a
real tty.
2.  Log out, note the processes stay there.
3.  From ssh, or another tty, kill the tty that you called start-memcached
from.
4.  Note that your memcached processes are dead and gone.

What is the expected output? What do you see instead?
Expected to see processes still there, there were none instead.


What version of the product are you using? On what operating system?
1.2.2-1+lenny1build0 on Ubuntu Jaunty (9.04)


Please provide any additional information below.
Here's the diff to a patch that fixes the issue.  It makes sure posix is
present before calling setsid()

--- a/start-memcached   2010-04-06 22:17:52.000000000 +0000
+++ b/start-memcached   2010-04-06 22:26:50.000000000 +0000
@@ -106,6 +106,8 @@
 if($pid == 0)
 {
                reopen_logfile($fd_reopened);
+               eval "use POSIX qw(setsid)";
+               setsid() unless $@;
                exec "$memcached $params";
                exit(0);



--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings


--
To unsubscribe, reply using "remove me" as the subject.

Reply via email to