Patch for bug 25063 - _pclose should wait for the command processor to terminate and return it's exit status

2010-11-20 Thread Borut Razem
On 11/18/2010 02:54 PM, Alexandre Julliard wrote > Yes, you need to grow it dynamically. That doesn't mean you need a linear search. Here is the new patch: dynamically allocated array of process handles indexed by fd, no linear search. The patch compiles without errors but I haven't done any t

Re: Patch for bug 25063 - _pclose should wait for the command processor to terminate and return it's exit status

2010-11-17 Thread Borut Razem
On 11/17/2010 11:45 AM, Alexandre Julliard wrote: Borut Razem writes: Yes, it looks huge, but we can reduce by a third by removing empty lines and comments (just kidding ;-). But the run-time overhead is minimal: allocation of the array at the first popen call and reallocation if more then 16

Re: Patch for bug 25063 - _pclose should wait for the command processor to terminate and return it's exit status

2010-11-16 Thread Borut Razem
On 11/16/2010 01:56 PM, Alexandre Julliard wrote: Borut Razem writes: +static void msvcrt_add_handle(MSVCRT_FILE *fp, HANDLE *hProcess) +{ + LOCK_POPEN; + if (fp2handle == NULL) + { +/* array not allocated yet: allocate it */ +if ((fp2handle = MSVCRT_malloc(sizeof (struct