C Function Question

Started by Terry Lee Tuckerover 16 years ago3 messagesgeneral
Jump to latest
#1Terry Lee Tucker
terry@chosen-ones.org

Greetings:

Does anyone know if a function written in C and linked into the backend in a
shared library with a statically declared structure, maintain that data for
the life of the backend process such that, when the function is called again,
the structure data is intact?

Thanks for any insight anyone can give...
--

#2Laurenz Albe
laurenz.albe@cybertec.at
In reply to: Terry Lee Tucker (#1)
Re: C Function Question

Terry Lee Tucker wrote:

Does anyone know if a function written in C and linked into the backend in a
shared library with a statically declared structure, maintain that data for
the life of the backend process such that, when the function is called again,
the structure data is intact?

Thanks for any insight anyone can give...

Yes, that should work.

Yours,
Laurenz Albe

#3Terry Lee Tucker
terry@chosen-ones.org
In reply to: Laurenz Albe (#2)
Re: C Function Question

On Tuesday 28 July 2009 03:22, Albe Laurenz wrote:

Terry Lee Tucker wrote:

Does anyone know if a function written in C and linked into the backend
in a shared library with a statically declared structure, maintain that
data for the life of the backend process such that, when the function is
called again, the structure data is intact?

Thanks for any insight anyone can give...

Yes, that should work.

Yours,
Laurenz Albe

Thanks for the reply Laurenze. I put together a small test case scenario and,
indeed, it does work as I had hoped and as you indicated.

Thanks for the help...
--