[Mailman-Users] mailmanctl holds ssh window open

Rohan Carly se456 at rohan.id.au
Mon Jul 14 06:55:06 CEST 2008


Mark Sapiro wrote:
> Rohan Carly wrote:
> 
>> I am experiencing a problem when I restart Mailman that I don't understand.
>>
>> If I login as root via ssh and then run:
>> 	/usr/lib/mailman/bin/mailmanctl start
>>
>> It says "Starting Mailman's master qrunner." and return to a shell prompt.
>>
>> Fine. But when I exit, the terminal window is stuck open. This doesn't happen 
>> when restarting other daemons on my system such as Apache.
>>
>> If I restart Mailman from the console and then exit, it behaves as expected. 
>> Also restarting from the console in X works normally. The problem seems to be 
>> limited to ssh / Putty (windows client).
>>
>> Can anyone tell me what's going on?
> 
> 
> mailmanctl forks copies of itself which become the master watcher and
> the qrunners. These forked copy processes are also attached to your
> ssh pseudo tty and sshd waits for them to terminate before closing the
> connection. Of course, they don't terminate (we hope) so you
> eventually close the connection from your side, but I think your sshd
> process still waits.
> 
> What is your OS? If you install a /etc/init.d/mailman script (see
> <http://www.list.org/mailman-install/node42.html>) and start mailman
> via the service command, I think you avoid this issue.

I've tried the service command, and it makes no difference.

I'm using Linux (Fedora 7). It already has a Mailman init script. It has a line:
   daemon $PYTHON $MAILMANCTL -s -q start

daemon is a function in /etc/rc.d/functions which does this:
   $nice runuser -s /bin/bash - $user -c "$corelimit >/dev/null 2>&1 ; $*"

Is it possible for mailmanctl to disassociate itself from the terminal?
Would the setsid() system call help?

-- 
Rohan Carly


More information about the Mailman-Users mailing list