0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# Copyright (C) 2000, 2001, 2004, 2007, 2012, 2016 Internet Systems Consortium, Inc. ("ISC")
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# This Source Code Form is subject to the terms of the Mozilla Public
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# License, v. 2.0. If a copy of the MPL was not distributed with this
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# file, You can obtain one at http://mozilla.org/MPL/2.0/.
43383a70d36d2c19da0354e96114817f55cae66aMichael Sawyer# A simple nanny to make sure named stays running.
43383a70d36d2c19da0354e96114817f55cae66aMichael Sawyerfork() && exit();
43383a70d36d2c19da0354e96114817f55cae66aMichael Sawyer open(FILE, $pid_file_location) || goto restart;
f004babe63a6a50bef91701d6f682ab27869c854Michael Sawyer $ps_command = "ps -axw | grep named | grep $pid | grep -v grep |";
43383a70d36d2c19da0354e96114817f55cae66aMichael Sawyer # ps_command MUST end in a pipe (|) character!
43383a70d36d2c19da0354e96114817f55cae66aMichael Sawyer # Make sure there's a named on the pid we just got. Since there is no
43383a70d36d2c19da0354e96114817f55cae66aMichael Sawyer # good way to test this, use the output from ps.
43383a70d36d2c19da0354e96114817f55cae66aMichael Sawyer $dig_command = "$dig_program +short . \@$nameserver_location > /dev/null";