Re: ntdll: Some code cleanup
1 Mar
2007
1 Mar
'07
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.
6862
Age (days ago)
6862
Last active (days ago)
0 comments
1 participants
participants (1)
-
Vitaliy Margolen