[uClibc] execve (uClibc vs glibc)
Thomas pang
thomaspang at shaw.ca
Wed Jun 30 18:33:25 UTC 2004
I look at uClibc exec* and find they are all based on execve() provided by the kernel.
In glibc 2.3.3, __execve check if the calling process is a threaded application
or not. If yes, it calls __pthread_kill_other_threads_np to kill all the
threads except itself.
int
__execve (file, argv, envp)
const char *file;
char *const argv[];
char *const envp[];
{
/* If this is a threaded application kill all other threads. */
if (__pthread_kill_other_threads_np)
__pthread_kill_other_threads_np ();
...
I am using linux kernel 2.4.22. I look at fs/exec.c and realize that do_execve() does not perform thread clean up.
Why are there such inconsistencies? Should we add the pthread checking and clean up in do_execve() as well?
Thanks.
- Thomas
More information about the uClibc
mailing list