This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: SystemTap for Android - patchset
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