Re: Running Application Inside Application

From: Bernd Petrovitsch
Date: Mon Nov 21 2011 - 06:05:56 EST


On Mon, 2011-11-21 at 11:25 +0800, Cong Wang wrote:
> On Mon, Nov 21, 2011 at 10:18 AM, Xin Tong <xerox.time.tech@xxxxxxxxx> wrote:
> > I have applications that do not install signal handlers I need it to
> > install. Therefore, I am thinking about having a light-weight run-time
> > to load the application ELF file and install the needed signal handler
> > in the run-time ? Is this doable ? What if it is not ELF-encoded ?
>
> If you want to exec*() to load the ELF, no, the signal handlers will be

It is in general so - not only fÃr ELF.

> cleared after exec*(), as the entire .text will be replaced by the new ELF file.
>
> So, you probably have to parse and load the ELF file by yourself.

Hmmm, if these (obviously broken) applications use dynamic linking, one
could probably use a preload library.
Never tried that though .....

Bernd
--
Bernd Petrovitsch Email : bernd@xxxxxxxxxxxxxxxxxxx
LUGA : http://www.luga.at

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/