* faults in dynamic libraries
@ 2002-06-13 9:45 Tver Mit
2002-06-13 11:52 ` Glynn Clements
0 siblings, 1 reply; 3+ messages in thread
From: Tver Mit @ 2002-06-13 9:45 UTC (permalink / raw)
To: linux-c-programming
Hi all.
I write a programm that uses plugins (on dl* functions base). When plugin code is free of
bugs all is ok, but when plugin faults by any reason, my programm do so. I want my programm
to work even if plugin dies. I see two ways:
1. handling signals
2. run plugin in different thread or process
but then:
in 1. what will be with resources, that plugin use ?
in 2. it'll be about 15-20 plugins running - so there will be 15-20 processes. And how to synchronise them all?
Got any ideas, opinions?
________________
Good hunt.
Tver mailto:Vukdev@mail.ru
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: faults in dynamic libraries
2002-06-13 9:45 faults in dynamic libraries Tver Mit
@ 2002-06-13 11:52 ` Glynn Clements
0 siblings, 0 replies; 3+ messages in thread
From: Glynn Clements @ 2002-06-13 11:52 UTC (permalink / raw)
To: Tver Mit; +Cc: linux-c-programming
Tver Mit wrote:
> I write a programm that uses plugins (on dl* functions base). When plugin code is free of
> bugs all is ok, but when plugin faults by any reason, my programm do so. I want my programm
> to work even if plugin dies. I see two ways:
> 1. handling signals
> 2. run plugin in different thread or process
> but then:
> in 1. what will be with resources, that plugin use ?
> in 2. it'll be about 15-20 plugins running - so there will be 15-20 processes. And how to synchronise them all?
>
> Got any ideas, opinions?
If a plugin shares its address space with the main program, a bug can
corrupt that address space, killing the main program.
Running plugins in a separate process is the only reliable mechanism,
but it probably isn't practical. Even then, a plugin may still be able
to interfere with the main process if they share system resources such
as file descriptors.
--
Glynn Clements <glynn.clements@virgin.net>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: faults in dynamic libraries
@ 2002-06-16 10:50 jnf
0 siblings, 0 replies; 3+ messages in thread
From: jnf @ 2002-06-16 10:50 UTC (permalink / raw)
To: Glynn Clements, Tver Mit; +Cc: linux-c-programming
not much better, but if one created a plugin manager type process that dealt with them all, it would keep the main process from dying if a plugin died?
--- Glynn Clements <glynn.clements@virgin.net> wrote:
>
>Tver Mit wrote:
>
>> I write a programm that uses plugins (on dl* functions base). When plugin code is free of
>> bugs all is ok, but when plugin faults by any reason, my programm do so. I want my programm
>> to work even if plugin dies. I see two ways:
>> 1. handling signals
>> 2. run plugin in different thread or process
>> but then:
>> in 1. what will be with resources, that plugin use ?
>> in 2. it'll be about 15-20 plugins running - so there will be 15-20 processes. And how to synchronise them all?
>>
>> Got any ideas, opinions?
>
>If a plugin shares its address space with the main program, a bug can
>corrupt that address space, killing the main program.
>
>Running plugins in a separate process is the only reliable mechanism,
>but it probably isn't practical. Even then, a plugin may still be able
>to interfere with the main process if they share system resources such
>as file descriptors.
>
>--
>Glynn Clements <glynn.clements@virgin.net>
>-
>To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
_____________________________________________________________
Sign up for FREE email from DoItYourself.com at http://doityourself.com
_____________________________________________________________
Promote your group and strengthen ties to your members with email@yourgroup.org by Everyone.net http://www.everyone.net/?btn=tag
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-06-16 10:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-06-13 9:45 faults in dynamic libraries Tver Mit
2002-06-13 11:52 ` Glynn Clements
-- strict thread matches above, loose matches on Subject: below --
2002-06-16 10:50 jnf
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 NNTP newsgroup(s).