Re: ntdll: Some code cleanup
March 1, 2007
5:50 a.m.
Felix Nawothnig wrote:
- if (last) - { - LdrShutdownProcess(); - exit( exit_code ); - } - else - { - LdrShutdownThread(); - server_exit_thread( exit_code ); - } + NtTerminateThread( GetCurrentThread(), func( arg ) ); + exit(0); /* To avoid a compiler warning, never reached. */
server_exit_thread() and NtTerminateThread() (which calls server_abort_thread()) are not the same things! Former gracefully exits the current thread freeing it's memory. Later rips it out from the process without freeing any resources. Needless to say you can't do that. Vitaliy.
7055
Age (days ago)
7055
Last active (days ago)
0 comments
1 participants
participants (1)
-
Vitaliy Margolen