stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <se...@roguewave.com>
Subject Re: svn commit: r562224 - in /incubator/stdcxx/trunk/util: display.cpp display.h exec.cpp runall.cpp target.h util.cpp util.h
Date Fri, 03 Aug 2007 21:41:48 GMT
Farid Zaripov wrote:
>> -----Original Message-----
>> From: Andrew Black [mailto:ablack@roguewave.com] 
>> Sent: Friday, August 03, 2007 6:36 PM
>> To: stdcxx-dev@incubator.apache.org
>> Subject: Re: svn commit: r562224 - in 
>> /incubator/stdcxx/trunk/util: display.cpp display.h exec.cpp 
>> runall.cpp target.h util.cpp util.h
>>
>> Something in this patch appears to cause the exec utility to 
>> hang on Windows.  I haven't had much time to dig into the 
>> cause, but I thought I'd give everyone a heads up.  Farid, if 
>> you have a chance, could you look into this?
> 
>   The exec process deadlocked in (exec.cpp, line 1055):
> -----
> warn_last_error ("Opening child input stream");
> -----
>   after the CreateFile (options->infname) has failed (because
> options->infname == "/dev/null").
> 
>   The proposed fix below, but deadlocking is the another issue to be
> resolved:

Thanks! I went ahead and committed it myself to get the builds
going again but I forgot to attribute it to you -- hope you're
okay with it. http://svn.apache.org/viewvc?view=rev&rev=562580

Martin


> 
> Index: util.cpp
> ===================================================================
> --- util.cpp	(revision 562407)
> +++ util.cpp	(working copy)
> @@ -200,9 +200,15 @@
>          free (fname);
>      }
>  
> +#ifndef _WIN32
> +#define DEV_NULL "/dev/null"
> +#else
> +#define DEV_NULL "NUL"
> +#endif
> +
>      /* If we didn't find a source file, use /dev/null */
> -    fname = (char*)RW_MALLOC (sizeof "/dev/null");
> -    strcpy (fname, "/dev/null");
> +    fname = (char*)RW_MALLOC (sizeof DEV_NULL);
> +    strcpy (fname, DEV_NULL);
>      return fname;
>  }
>  
> 
> Farid.


Mime
View raw message