This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: [patch] Fix dlclose / exit running in parallel resulting in dtor being called twice


* Paul Pluzhnikov:

> +void *
> +open_library (const char * pathname)
> +{
> +  void *dso;
> +  char *err;
> +
> +  /* Open the DSO.  */
> +  dso = dlopen (pathname, RTLD_NOW|RTLD_GLOBAL);
> +  if (dso == NULL)
> +    {
> +      err = dlerror ();
> +      fprintf (stderr, "%s\n", err);
> +      exit (1);
> +    }
> +  /* Clear any errors.  */
> +  dlerror ();
> +  return dso;
> +}

Why did you add the dlerror call in the success case?

Thanks,
Florian


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