couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Damien Katz <dam...@apache.org>
Subject Re: Stopping externals
Date Fri, 12 Feb 2010 21:09:19 GMT
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.
> 
> 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
> 
> Randall
> 
> On Fri, Feb 12, 2010 at 04:26, Markus Jelsma <markus@buyways.nl> wrote:
>> Hi Paul,
>> 
>> 
>> 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
>> 
>> Can you confirm this is the desired output?
>> 
>> 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.
>> 
>> Here is the Python code that sits in the main loop:
>> stuff = sys.stdin.readline()
>>    if not stuff:
>>        return
>> 
>> Perhaps a lounge developer can tell us whether the replicator actually behaves
>> as Troy suggested.
>> 
>> 
>> Cheers,
>> 
>> 
>>> Don't recall when that came in. To check:
>>> 
>>> $ find $PREFIX/lib/couchdb -name "couchspawnkillable*"
>>> 
>>> If that finds something then it should be new enough to theoretically
>>> kill things.
>>> 
>>> Also, you should still use Troy's pattern for reading from stdin to be
>>> well behaved for the case that we have a bug. :)
>>> 
>>> HTH,
>>> Paul Davis
>>> 
>>> Managed to forget the ML in my reply.
>> 
>> 
>> Markus Jelsma - Technisch Architect - Buyways BV
>> http://www.linkedin.com/in/markus17
>> 050-8536620 / 06-50258350
>> 
>> 


Mime
View raw message