This is the mail archive of the
cygwin-patches
mailing list for the Cygwin project.
Re: Add wrappers for ExitProcess, TerminateProcess
Corinna Vinschen wrote:
> I have some doubts that we really need such a functionality externally
> available, outside of the limited scenario of something like
> pseudo-reloc. An API for those knowing what this is about is very
> likely sufficient. What about
>
> cygwin_internal (CW_TERMINATE_PROCESS);
> cygwin_internal (CW_EXIT_PROCESS);
hmm...probably
cygwin_internal (CW_TERMINATE_PROCESS, HANDLE, UINT)
cygwin_internal (CW_EXIT_PROCESS, UINT)
right?
> No new entry point, no need to document it.
I have no objection. Once I finished it and went back to write the
documentation and the email, I realized and documented that since you're
still skipping over a lot of the cygwin cleanup code:
Ordinarily, however, the ANSI abort() or the POSIX _exit() function
should be preferred over either TerminateProcess or
cygwin_terminate_process when used to terminate the current process.
Similarly, the POSIX kill() function should be used to terminate cygwin
processes other than the current one.
and
Ordinarily, however, the ANSI exit() function should be preferred over
either ExitProcess or cygwin_exit_process
If we do it as a cygwin_internal call, we can always expose it later if
we decide that doing so would be valuable -- but you can't go the other way.
I'll work on a re-revised version this evening.
--
Chuck