public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: fche@redhat.com (Frank Ch. Eigler)
To: Alexander Lochmann <alexander.lochmann@tu-dortmund.de>
Cc: Josh Stone <jistone@redhat.com>, systemtap@sourceware.org
Subject: Re: SystemTap for Android - patchset
Date: Wed, 06 Jul 2016 16:42:00 -0000	[thread overview]
Message-ID: <y0meg7690rn.fsf@fche.csb> (raw)
In-Reply-To: <577CF9A2.7050008@tu-dortmund.de> (Alexander Lochmann's message of "Wed, 6 Jul 2016 14:29:22 +0200")

Alexander Lochmann <alexander.lochmann@tu-dortmund.de> 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

  reply	other threads:[~2016-07-06 16:42 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <f01a1f27-3cdb-61a4-cbdb-7bffd1032c8e@tu-dortmund.de>
2016-07-01 16:15 ` Alexander Lochmann
2016-07-01 16:56   ` David Smith
2016-07-01 17:47   ` Josh Stone
2016-07-06 12:29     ` Alexander Lochmann
2016-07-06 16:42       ` Frank Ch. Eigler [this message]
2016-07-06 20:05         ` Alexander Lochmann
2016-07-06 20:15           ` Frank Ch. Eigler
2016-07-06 20:27             ` Alexander Lochmann
2016-07-07 16:00       ` David Smith
2016-07-07 16:06       ` David Smith
2016-07-07 16:23         ` Alexander Lochmann
2016-07-07 17:39           ` David Smith
2016-07-07 20:51             ` Alexander Lochmann
2016-07-07 21:14               ` David Smith
2016-07-08  5:38                 ` Alexander Lochmann
2016-07-08 15:31                   ` David Smith
2016-07-07 18:47       ` David Smith
2016-07-07 19:01         ` Alexander Lochmann
2016-07-07 19:24           ` David Smith
2016-07-07 19:32             ` Alexander Lochmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=y0meg7690rn.fsf@fche.csb \
    --to=fche@redhat.com \
    --cc=alexander.lochmann@tu-dortmund.de \
    --cc=jistone@redhat.com \
    --cc=systemtap@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).