Re: [PATCH] --std=c89 error in sys/signal.h

2009-10-05 Thread Corinna Vinschen
On Oct 4 20:44, Yaakov S wrote: > On 29/09/2009 20:11, Yaakov (Cygwin/X) wrote: >> On 29/09/2009 19:35, Yaakov (Cygwin/X) wrote: >>> Anyway, to answer the question, AFAICS in glibc, #include >>> unconditionally[1]. ( is just one line: >>> #include [2]) >>> >>> So should I take the first route,

Re: [PATCH] --std=c89 error in sys/signal.h

2009-10-05 Thread Yaakov (Cygwin/X)
On 05/10/2009 03:37, Corinna Vinschen wrote: Newlib, methinks. OK, I'll send a patch there. I think the newlib kill declaration should be changed to pid_t, since that's simply correct per POSIX. I can;t believe the RTEMS people have a problem with that. Did you forget about the ESTRPIPE ep

Re: [PATCH] --std=c89 error in sys/signal.h

2009-10-05 Thread Corinna Vinschen
On Oct 5 09:18, Yaakov S wrote: > On 05/10/2009 03:37, Corinna Vinschen wrote: >> Newlib, methinks. > > OK, I'll send a patch there. > >> I think the newlib kill declaration should be changed to pid_t, since >> that's simply correct per POSIX. >> >> I can;t believe the RTEMS people have a problem

Add wrappers for ExitProcess, TerminateProcess

2009-10-05 Thread Charles Wilson
Normally, posix programs should call abort(), exit(), _exit(), kill() -- or various pthread functions -- to terminate operation (either their own, or that of some other processes/thread). However, there are two cases where the win32 ExitProcess and TerminateProcess functions might justifiably be c

Re: Add wrappers for ExitProcess, TerminateProcess

2009-10-05 Thread Dave Korn
Charles Wilson wrote: > int main(int argc, char* argv[]) > { > //cygwin_terminate_process (GetCurrentProcess(), > STATUS_ILLEGAL_DLL_PSEUDO_RELOCATION); > cygwin_exit_process (STATUS_ILLEGAL_DLL_PSEUDO_RELOCATION); > exit (1); > } Heh. I see what you did there!

Re: Add wrappers for ExitProcess, TerminateProcess

2009-10-05 Thread Dave Korn
Dave Korn wrote: > Heh. I see what you did there! As to the actual patch itself, it looks sane (just reading it by eye, I haven't tested it), and the design motivation seems reasonable. > @@ -136,11 +136,19 @@ status_exit (DWORD x) > > # define self (*this) > void > +pinfo::set_exit_cod

Re: Add wrappers for ExitProcess, TerminateProcess

2009-10-05 Thread Charles Wilson
Dave Korn wrote: > Charles Wilson wrote: >> //cygwin_terminate_process (GetCurrentProcess(), >> STATUS_ILLEGAL_DLL_PSEUDO_RELOCATION); > Heh. I see what you did there! Oops. Never cut-n-paste, and then edit. -- Chuck

Re: Add wrappers for ExitProcess, TerminateProcess

2009-10-05 Thread Charles Wilson
Dave Korn wrote: > As to the actual patch itself, it looks sane (just reading it by eye, I > haven't tested it), and the design motivation seems reasonable. [snip] > File-local extern declarations are pure evil, let alone function-local ones. > Why not fix this badness while you're touching it

Re: Add wrappers for ExitProcess, TerminateProcess

2009-10-05 Thread Dave Korn
Charles Wilson wrote: > Dave Korn wrote: >> As to the actual patch itself, it looks sane (just reading it by eye, I >> haven't tested it), and the design motivation seems reasonable. > [snip] >> File-local extern declarations are pure evil, let alone function-local >> ones. >> Why not fix thi

Re: Add wrappers for ExitProcess, TerminateProcess

2009-10-05 Thread Charles Wilson
Dave Korn wrote: > Wouldn't see any need to move the declaration any; just think that there > should be one unique extern declaration and it should be in a common header > that can be #included both where the var is declared and where it is > referenced. Well, the variable IS a global, shared b

Re: Add wrappers for ExitProcess, TerminateProcess

2009-10-05 Thread Dave Korn
Charles Wilson wrote: > By moving the definition to globals.cc, we get its extern declaration in > the autogenerated globals.h -- which everybody includes via winsup.h. Ooh, I forgot we had that. Makes sense then. cheers, DaveK

Re: Add wrappers for ExitProcess, TerminateProcess

2009-10-05 Thread Corinna Vinschen
On Oct 5 15:04, Charles Wilson wrote: > Normally, posix programs should call abort(), exit(), _exit(), kill() -- > or various pthread functions -- to terminate operation (either their > own, or that of some other processes/thread). However, there are two > cases where the win32 ExitProcess and Te

Re: Add wrappers for ExitProcess, TerminateProcess

2009-10-05 Thread Charles Wilson
Dave Korn wrote: > Charles Wilson wrote: > >> By moving the definition to globals.cc, we get its extern declaration in >> the autogenerated globals.h -- which everybody includes via winsup.h. > > Ooh, I forgot we had that. Makes sense then. As revised: 2009-10-04 Charles Wilson <...>

Re: Add wrappers for ExitProcess, TerminateProcess

2009-10-05 Thread Christopher Faylor
On Mon, Oct 05, 2009 at 10:27:22PM +0200, Corinna Vinschen wrote: >On Oct 5 15:04, Charles Wilson wrote: >> Normally, posix programs should call abort(), exit(), _exit(), kill() -- >> or various pthread functions -- to terminate operation (either their >> own, or that of some other processes/threa

Re: Add wrappers for ExitProcess, TerminateProcess

2009-10-05 Thread Charles Wilson
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

Re: Add wrappers for ExitProcess, TerminateProcess

2009-10-05 Thread Christopher Faylor
On Mon, Oct 05, 2009 at 04:28:34PM -0400, Charles Wilson wrote: >Dave Korn wrote: >> Charles Wilson wrote: >> >>> By moving the definition to globals.cc, we get its extern declaration in >>> the autogenerated globals.h -- which everybody includes via winsup.h. >> >> Ooh, I forgot we had that.

Re: Add wrappers for ExitProcess, TerminateProcess

2009-10-05 Thread Charles Wilson
Christopher Faylor wrote: > I've checked in the sigExeced part of this patch. Thanks. The checkin does not yet appear to have taken effect, because $ cvs update && cvs diff still shows the sigExeced stuff -- so, it's still in the patch/changelog below. > For the other part, if you're willing,

Re: Add wrappers for ExitProcess, TerminateProcess

2009-10-05 Thread Christopher Faylor
On Mon, Oct 05, 2009 at 04:49:11PM -0400, Charles Wilson wrote: >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 >>

Re: Add wrappers for ExitProcess, TerminateProcess

2009-10-05 Thread Charles Wilson
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