bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: _cthread_init_routine and _cthread_exit_routine


From: Neal H. Walfield
Subject: Re: _cthread_init_routine and _cthread_exit_routine
Date: Thu, 05 May 2005 18:06:36 +0100
User-agent: Wanderlust/2.10.1 (Watching The Wheels) SEMI/1.14.6 (Maruoka) FLIM/1.14.6 (Marutamachi) APEL/10.6 Emacs/21.3 (i386-pc-linux-gnu) MULE/5.0 (SAKAKI)

> >  Does that mean glibc should be to actually call
                                   ^fixed
> > _cthread_exit_initializer?  Should I file a bug report?
> 
> Huh?  I just described why no further libc change is required.

Allow me to illustrate the problem in more concrete terms.  Consider
the following program:

  #include <stdio.h>
  #include <stdlib.h>
  
  void
  _cthread_exit_routine (int status)
  {
    printf ("%s called.\n", __FUNCTION__);
    exit (status);
  }
  
  int
  main (int argc, char *argv)
  {
    return 0;
  }

libc should call _cthread_exit_routine when main returns.  Yet,
running this program on a Hurd box produces no output.  Putting a
break point on exit (which is called when main returns), shows:

  #0  0x0107eca6 in exit () from /lib/libc.so.0.3
  #1  0x0106716e in __libc_start_main () from /lib/libc.so.0.3
  #2  0x08048421 in _start () at ../sysdeps/i386/elf/start.S:102

So, libc/sysdeps/mach/start.c is not being used and there is no other
code to call _cthread_exit_routine.

Is that clearer?

Thanks,
Neal




reply via email to

[Prev in Thread] Current Thread [Next in Thread]