From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30909 invoked by alias); 6 Jul 2016 16:42:14 -0000 Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org Received: (qmail 30887 invoked by uid 89); 6 Jul 2016 16:42:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1034, H*i:sk:577CF9A, H*f:sk:577CF9A, $program X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 06 Jul 2016 16:42:03 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BCECB2641; Wed, 6 Jul 2016 16:42:02 +0000 (UTC) Received: from fche.csb (unused [10.10.52.236] (may be forged)) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u66Gg26U016368; Wed, 6 Jul 2016 12:42:02 -0400 Received: by fche.csb (Postfix, from userid 2569) id F35465817C; Wed, 6 Jul 2016 12:42:04 -0400 (EDT) To: Alexander Lochmann Cc: Josh Stone , systemtap@sourceware.org Subject: Re: SystemTap for Android - patchset References: <56e0c7f4-d317-f76b-5156-3569a6097b62@tu-dortmund.de> <577CF9A2.7050008@tu-dortmund.de> From: fche@redhat.com (Frank Ch. Eigler) Date: Wed, 06 Jul 2016 16:42:00 -0000 In-Reply-To: <577CF9A2.7050008@tu-dortmund.de> (Alexander Lochmann's message of "Wed, 6 Jul 2016 14:29:22 +0200") Message-ID: User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2016-q3/txt/msg00009.txt.bz2 Alexander Lochmann writes: > [...] > I chose the letters randomly. For me, it doesn't matter. I just need an > argument to tell staprun to create a pid file. :) Would it be enough for staprun to have that pid option? That would mean the stap script would have to be compiled through to -p4 only, then staprun invoked manually. > Yeah, sure. Since I run stap on Android, I have a background service, > which periodically checks if every single stap instance is still > running. Yes, it might be possible having more than one stap script > running. :) [...] Since your background service is already custom, maybe a custom shell script wrapper like this could serve your purposes without having to change staprun/stap at all: % cat pidwrapper #! /bin/sh pidfile="$1"; shift program="$1"; shift echo $$ > $pidfile exec $program ${1+$@} # exec to preserve $$ pid and then you invoke staprun via: % sh pidwrapper /path/to/this.pid staprun foo bar baz - FChE