This is the mail archive of the cygwin-patches mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Add wrappers for ExitProcess, TerminateProcess


On Oct  5 23:58, Charles Wilson wrote:
> Christopher Faylor wrote:
> > On Mon, Oct 05, 2009 at 04:49:11PM -0400, Charles Wilson wrote:
> >> hmm...probably
> >>     cygwin_internal (CW_TERMINATE_PROCESS, HANDLE, UINT)
> >>     cygwin_internal (CW_EXIT_PROCESS, UINT)
> >> right?
> > 
> > Do we really have to provide the ability to kill some other process?
> > Maybe we really only need one call with two arguments - one which is the
> > exit value and one which indicates whether to exit with prejudice.
> > 
> > cygwin_internal (CW_EXIT_PROCESS, UINT, bool);
> > 
> > where the bool argument is true if we want to call TerminateProcess on
> > this process.
> 
> Fine with me. The two-function version was just a derivative of my
> earlier "just wrap [Exit|Terminate]Process" approach, trying to mimic
> the w32api.
> 
> However
> 
> by going the cgywin_internal route, there's really no point in slavishly
> following the w32api. And besides, the implementation of
> cygwin_internal(CW_TERMINATE_PROCESS,...) really does nothing special if
> called with a HANDLE to a different process -- you might as well call
> TerminateProcess() itself, in that case.
> 
> I'll wait for other comments, before taking any additional action, tho.

I can live with both variations, though I like the one entry point idea
as in `cygwin_internal (CW_EXIT_PROCESS, UINT, bool)'  more.


Thanks,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]