This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: stap vs pgrps


> But I don't think users see stap as a batch thing, they see it as that
> program that provides them the output they want to read interactively.

I said "batch-style command-line" because I was trying not to use only
pedantic technical terms, but "batch" is a poor word.  What I'm talking
about is any normal command-line tool that does not do funny business with
the terminal.  "tail -f" qualifies too.

> If they kill/interrupt it, then they expect it to die and clean up after
> itself. You expect the same from a python or perl script that you run,
> won't you?

That's not the point.  Of course things should clean up after themselves.
The issue is how that comes about.  In the normal world of Unix tools, this
happens by any subprocesses getting the same pgrp-wide signal, and the
parent just catches that signal, waits for its children, and cleans up.

> So, this is basically the original problem statement. Being robust
> during the staprun phase. That is what we care about. If someone kills
> stap during normal interactive running it (either from a shell, an
> external program or a quick and dirty script) we want staprun to

You seem to be conflating the staprun phase with the stapio phase.
That distinction is what I raised.

> Should we turn all this around? Add a "--watch-parent" argument to
> staprun (or maybe --controller <pid>), so that staprun monitors that
> process (which normally will just be the interactive stap program) and
> then when that process dies for whatever reason cleans up silently.

That is one approach.  Another one is to share some other resource tied to
the stap process that staprun can notice die, such as a pipe.


Thanks,
Roland


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]