This is the mail archive of the
cygwin-patches
mailing list for the Cygwin project.
Re: Add wrappers for ExitProcess, TerminateProcess
Christopher Faylor wrote:
> Looks good with a minor kvetch: Could you use "bool" instead of "BOOL"
> for variables that don't have to be passed to a Windows function that
> takes a BOOL argument?
For the static function exit_process(), sure. But the argument list
accepted by cygwin_internal() should be C-compatible, shouldn't it? So,
how about the following?
static void exit_process (UINT, bool) __attribute__((noreturn));
...
static void
exit_process (UINT status, bool useTerminateProcess)
{
...
}
...
case CW_EXIT_PROCESS:
{
UINT status = va_arg (arg, UINT);
BOOL useTerminateProcess = va_arg (arg, BOOL);
exit_process (status, !!useTerminateProcess); /* no return */
}
--
Chuck