Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Jul 1999 12:10:35 +0400
From:      "Andrew Iltchenko" <andrey@agama.com>
To:        <freebsd-hackers@freebsd.org>
Subject:   Re: Dynamic linking
Message-ID:  <000701bec850$311d3850$90e25ec3@agama.ru>
References:  <199907061659.JAA15453@vashon.polstra.com>

next in thread | previous in thread | raw e-mail | index | archive | help
How clever Jhon.

I know that a void function cannot return a value, the same is also true of
destructors and constractors, to be exact.

I asked, how I can make dlopen return an error from the shared object's
_init function, and not what value I should return from the void function to
fail dlopen.

I mean what function shall I call from _init so that dlopen will return
error. I am sure it is possible, because dlopen calls _init prior to
returning.

----- Original Message -----
From: John Polstra <jdp@polstra.com>
To: <andrey@agama.com>
Cc: <hackers@freebsd.org>
Sent: Tuesday, July 06, 1999 8:59 PM
Subject: Re: Dynamic linking


> In article <3780AEB2.206160E0@agama.com>,
> Andrew Iltchenko  <andrey@agama.com> wrote:
> > Hi everyone!
> >
> > Is there a way of making dlopen return an error from the shared object's
> > _init function?
>
> No.  The _init function by definition is "void _init(void)", and so
> it cannot return a value.
>
> John
> --
>   John Polstra
jdp@polstra.com
>   John D. Polstra & Co., Inc.                        Seattle, Washington
USA
>   "No matter how cynical I get, I just can't keep up."        -- Nora
Ephron



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?000701bec850$311d3850$90e25ec3>