summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Kocoloski <adam@cloudant.com>2010-08-27 23:29:13 -0400
committerAdam Kocoloski <adam@cloudant.com>2010-08-27 23:29:20 -0400
commitc11a92e53306f54071ed1a561e3a90ce9b2dad04 (patch)
tree432eaa4763d267cb58b2f061a0d59e550a25760e
parent342b04f23ed625acb147bc628df641601ea8fbe7 (diff)
use couchspawnkillable from privdir instead of overlay
-rwxr-xr-x[-rw-r--r--]apps/couch/priv/couchspawnkillable.sh0
-rw-r--r--apps/couch/src/couch_os_process.erl2
-rwxr-xr-xrel/overlay/bin/couchspawnkillable20
3 files changed, 1 insertions, 21 deletions
diff --git a/apps/couch/priv/couchspawnkillable.sh b/apps/couch/priv/couchspawnkillable.sh
index f8d042e3..f8d042e3 100644..100755
--- a/apps/couch/priv/couchspawnkillable.sh
+++ b/apps/couch/priv/couchspawnkillable.sh
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 $*