Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 27944 invoked from network); 12 Feb 2010 21:09:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 12 Feb 2010 21:09:53 -0000 Received: (qmail 71765 invoked by uid 500); 12 Feb 2010 21:09:52 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 71681 invoked by uid 500); 12 Feb 2010 21:09:52 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 71671 invoked by uid 99); 12 Feb 2010 21:09:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Feb 2010 21:09:52 +0000 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.68.5.9] (HELO relay00.pair.com) (209.68.5.9) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 12 Feb 2010 21:09:41 +0000 Received: (qmail 55046 invoked from network); 12 Feb 2010 21:09:19 -0000 Received: from 69.181.72.204 (HELO ?10.0.1.4?) (69.181.72.204) by relay00.pair.com with SMTP; 12 Feb 2010 21:09:19 -0000 X-pair-Authenticated: 69.181.72.204 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1077) Subject: Re: Stopping externals From: Damien Katz In-Reply-To: Date: Fri, 12 Feb 2010 13:09:19 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201002121326.57128.markus@buyways.nl> To: user@couchdb.apache.org X-Mailer: Apple Mail (2.1077) Haven't been following the whole discussion, but if the erlang vm is = crashed and restarted, then the child process are not forcibly killed. = So it's up to the child processes to terminate themselves in that case, = even with the spawnkillable stuff. -Damien On Feb 12, 2010, at 1:05 PM, Randall Leeds wrote: > It looks like lounge is *almost* doing the right thing. > Couchspawnkillable should be killing it, so it's strange that it hangs = around. >=20 > I added a little fix that should try to signal the background thread > to stop when sys.in shut downs. > Give the version on this new branch a try, please: > = http://github.com/tilgovi/couchdb-lounge/raw/replicatorshutdown/replicator= /replication_notifier.py >=20 > Randall >=20 > On Fri, Feb 12, 2010 at 04:26, Markus Jelsma = wrote: >> Hi Paul, >>=20 >>=20 >> CouchDB 0.10 does seem to have couchspawnkillable; >> couch-1 [~/apache-couchdb-0.10.0] # find -name "couchspawnkillable*" >> ./src/couchdb/priv/couchspawnkillable_win.c >> ./src/couchdb/priv/couchspawnkillable >> ./src/couchdb/priv/couchspawnkillable.sh >> ./src/couchdb/priv/.deps/couchspawnkillable_win.Po >>=20 >> Can you confirm this is the desired output? >>=20 >> Anyway, if so there might probably be a bug then because the = replicator does >> not quit with CouchDB. I am not entirely sure whether the replicator = checks >> for a terminating pipe but i guess it does. >>=20 >> Here is the Python code that sits in the main loop: >> stuff =3D sys.stdin.readline() >> if not stuff: >> return >>=20 >> Perhaps a lounge developer can tell us whether the replicator = actually behaves >> as Troy suggested. >>=20 >>=20 >> Cheers, >>=20 >>=20 >>> Don't recall when that came in. To check: >>>=20 >>> $ find $PREFIX/lib/couchdb -name "couchspawnkillable*" >>>=20 >>> If that finds something then it should be new enough to = theoretically >>> kill things. >>>=20 >>> Also, you should still use Troy's pattern for reading from stdin to = be >>> well behaved for the case that we have a bug. :) >>>=20 >>> HTH, >>> Paul Davis >>>=20 >>> Managed to forget the ML in my reply. >>=20 >>=20 >> Markus Jelsma - Technisch Architect - Buyways BV >> http://www.linkedin.com/in/markus17 >> 050-8536620 / 06-50258350 >>=20 >>=20