From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roger Pau Monne Subject: Re: [PATCH 9/9] init/NetBSD: move xenbackendd to xend init script Date: Wed, 18 Jul 2012 10:43:02 +0100 Message-ID: <50068526.8080107@citrix.com> References: <1342002232-75531-1-git-send-email-roger.pau@citrix.com> <1342002232-75531-10-git-send-email-roger.pau@citrix.com> <20485.36379.841767.872741@mariner.uk.xensource.com> <50059187.8080802@citrix.com> <50067C0D.9020908@amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <50067C0D.9020908@amd.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Christoph Egger Cc: Ian Jackson , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org Christoph Egger wrote: > On 07/17/12 18:23, Roger Pau Monne wrote: > >> Ian Jackson wrote: >>> Roger Pau Monne writes ("[PATCH 9/9] init/NetBSD: move xenbackendd to xend init script"): >>>> xenbackendd is not needed by the xl toolstack, so move it's launch to >>>> the xend script. >>> Acked-by: Ian Jackson >>> >>> on the basis that it doesn't touch non-BSD code. But: >>> >>>> + printf "Stopping xenbackendd, xend\n" >>>> + xb_pid=$(check_pidfile ${XENBACKENDD_PIDFILE} ${SBINDIR}/xenbackendd) >>>> + xend_pid=`ps x -o pid,command|grep ${SBINDIR}/xend|awk '{ print $1 }'` >>>> + if test -n "$xb_pid"; >>>> + then >>>> + kill -${sig_stop:-TERM} $xb_pid >>> This is pretty horrid. Does BSD not have better ways to manage >>> daemons ? >> Yes, but xend seems to spawn two processes that regenerate, so you have >> to kill them with one shot, or it will be useless. "xend stop" doesn't >> work either, but since xend is deprecated I think it's rather useless to >> try to fix this properly now. > > > pkill xend should do it. :) Neither pgrep or pkill work, because the process command is registered as "/usr/pkg/bin/python2.7 /usr/xen42/sbin/xend start". I've tried: pgrep /usr/xen42/sbin/xend pgrep xend pkill /usr/xen42/sbin/xend pkill xend And none of them work :(