From c11a92e53306f54071ed1a561e3a90ce9b2dad04 Mon Sep 17 00:00:00 2001 From: Adam Kocoloski Date: Fri, 27 Aug 2010 23:29:13 -0400 Subject: use couchspawnkillable from privdir instead of overlay --- apps/couch/priv/couchspawnkillable.sh | 0 apps/couch/src/couch_os_process.erl | 2 +- rel/overlay/bin/couchspawnkillable | 20 -------------------- 3 files changed, 1 insertion(+), 21 deletions(-) mode change 100644 => 100755 apps/couch/priv/couchspawnkillable.sh delete mode 100755 rel/overlay/bin/couchspawnkillable diff --git a/apps/couch/priv/couchspawnkillable.sh b/apps/couch/priv/couchspawnkillable.sh old mode 100644 new mode 100755 diff --git a/apps/couch/src/couch_os_process.erl b/apps/couch/src/couch_os_process.erl index 1fe38e8e..7fe8aa89 100644 --- a/apps/couch/src/couch_os_process.erl +++ b/apps/couch/src/couch_os_process.erl @@ -104,7 +104,7 @@ readjson(#os_proc{} = OsProc) -> % gen_server API init([Command, Options, PortOptions]) -> - Spawnkiller = filename:join([code:root_dir(), "bin", "couchspawnkillable"]), + Spawnkiller = filename:join([code:priv_dir(couch), "couchspawnkillable.sh"]), BaseProc = #os_proc{ command=Command, port=open_port({spawn, Spawnkiller ++ " " ++ Command}, PortOptions), diff --git a/rel/overlay/bin/couchspawnkillable b/rel/overlay/bin/couchspawnkillable deleted file mode 100755 index b52831f9..00000000 --- a/rel/overlay/bin/couchspawnkillable +++ /dev/null @@ -1,20 +0,0 @@ -#! /bin/sh -e - -# Licensed under the Apache License, Version 2.0 (the "License"); you may not -# use this file except in compliance with the License. You may obtain a copy of -# the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations under -# the License. - -# The purpose of this script is to echo an OS specific command before launching -# the actual process. This provides a way for Erlang to hard-kill its external -# processes. - -echo "kill -9 $$" -exec nice -n 19 $* -- cgit v1.2.3