From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 335461384C5 for ; Tue, 15 Jan 2013 23:23:25 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8B80F21C0B2; Tue, 15 Jan 2013 23:23:16 +0000 (UTC) Received: from mail-yh0-f43.google.com (mail-yh0-f43.google.com [209.85.213.43]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 1173A21C00A for ; Tue, 15 Jan 2013 23:23:14 +0000 (UTC) Received: by mail-yh0-f43.google.com with SMTP id 27so142432yhr.2 for ; Tue, 15 Jan 2013 15:23:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:x-enigmail-version:content-type; bh=oMacVz70Tcud4//bFC6gJudzePS3qdUZaMkqDUl514E=; b=goMzVxskENDdqEyzofNgBIzeluA5GF7iev1cuFDJsZzdQxcEABfpUjM++h1rZOXMT5 NqjLLOQZyQMvMNKEah+2+a4S2q57SPVQE3t6ydr0r5SrBSHCu3C3o//0/SCT1r05JMqY 3Mmn6YZdujchTngevxrs7eEn/3ZsTJrBiIevQXUsE8sv/fTCfxH47HmA4iDEOgkz/UBp c5upJ3SHXcbAThFlyX8TNhCRfTtCLdvny5SOdqbUZ5ynAXj8flP05XJf0ZO18u33M3AF k+W6E3ePSX8sr76rP2ont3wwYzPWowBCFRcgmvZnSy9f1unnZI3QUfJtScMx1ohoEP48 wCNQ== X-Received: by 10.236.128.73 with SMTP id e49mr101034625yhi.53.1358292194210; Tue, 15 Jan 2013 15:23:14 -0800 (PST) Received: from [192.168.2.5] (adsl-65-0-118-184.jan.bellsouth.net. [65.0.118.184]) by mx.google.com with ESMTPS id h37sm15434021anm.10.2013.01.15.15.23.12 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 15 Jan 2013 15:23:13 -0800 (PST) Message-ID: <50F5E4DD.1060004@gmail.com> Date: Tue, 15 Jan 2013 17:23:09 -0600 From: Dale User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:18.0) Gecko/20100101 Firefox/18.0 SeaMonkey/2.15 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Re: /home doesn't umount on shutdown References: <20130115115721.16ea5ca0@khamul.example.com> <20130115110956.5c7e5a17@digimed.co.uk> <20130115145826.00706056@khamul.example.com> <50F5DE86.2000105@gmail.com> In-Reply-To: X-Enigmail-Version: 1.5 Content-Type: multipart/alternative; boundary="------------020008000208040208030300" X-Archives-Salt: 2af70951-9741-4980-a3e3-898d779828cb X-Archives-Hash: 3286e632aa2b05c58bff3b344e5a6321 This is a multi-part message in MIME format. --------------020008000208040208030300 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Remy Blank wrote: > Dale wrote: >> Care to share that script? ;-) May try that myself. > > Sure, here it is: > > $ cat .kde4/shutdown/cleanup-kde-processes > #!/bin/bash > > log() { > logger -t "$(basename $0)" "$1" > } > > is_running() { > killall -0 -u $USER "$1" > } > > kill_if_running() { > sleep 15 > is_running startkde && return 0 > if is_running $1; then > log "$1 still running, sending TERM" > killall -s TERM $1 > sleep 5 > is_running startkde && return 0 > if is_running $1; then > log "$1 still running, sending KILL" > killall -s KILL $1 > fi > fi > } > > kill_if_running kded4 & > kill_if_running nepomukserver & > Thanks much. This will be better than killing them all one by one. Dale :-) :-) -- I am only responsible for what I said ... Not for what you understood or how you interpreted my words! --------------020008000208040208030300 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit Remy Blank wrote:
> Dale wrote:
>> Care to share that script? ;-) May try that myself.
>
> Sure, here it is:
>
> $ cat .kde4/shutdown/cleanup-kde-processes
> #!/bin/bash
>
> log() {
> logger -t "$(basename $0)" "$1"
> }
>
> is_running() {
> killall -0 -u $USER "$1"
> }
>
> kill_if_running() {
> sleep 15
> is_running startkde && return 0
> if is_running $1; then
> log "$1 still running, sending TERM"
> killall -s TERM $1
> sleep 5
> is_running startkde && return 0
> if is_running $1; then
> log "$1 still running, sending KILL"
> killall -s KILL $1
> fi
> fi
> }
>
> kill_if_running kded4 &
> kill_if_running nepomukserver &
>


Thanks much.  This will be better than killing them all one by one.

Dale

:-)  :-)

--
I am only responsible for what I said ... Not for what you understood or how you interpreted my words!

--------------020008000208040208030300--