Re: [PATCH 08/12] fast-import: MinGW does not have getppid(). So do not print it.
- From
Steffen Prohaska <prohaska@zib.de>
- Date
- Jul 2, 2008, 14:22 UTC
- Message-ID
- <A1D7E098-B5FD-42F6-8EAD-8AACF0B8D764@zib.de>
- In-Reply-To
- <7vzlp0bq2l.fsf@gitster.siamese.dyndns.org>
On Jul 2, 2008, at 11:20 AM, Junio C Hamano wrote:
Show 29 quoted lines
> Steffen Prohaska <prohaska@zib.de> writes:
>
>> diff --git a/fast-import.c b/fast-import.c
>> index e72b286..271b93c 100644
>> --- a/fast-import.c
>> +++ b/fast-import.c
>> @@ -391,7 +391,9 @@ static void write_crash_report(const char *err)
>>
>> fprintf(rpt, "fast-import crash report:\n");
>> fprintf(rpt, " fast-import process: %d\n", getpid());
>> +#ifndef __MINGW32__
>> fprintf(rpt, " parent process : %d\n", getppid());
>> +#endif
>> fprintf(rpt, " at %s\n", show_date(time(NULL), 0, DATE_LOCAL));
>> fputc('\n', rpt);
>>
>> --
>> 1.5.6.1.255.g32571
>
> It does not matter too much for this part that writes crash report,
> but
> keeping the file format the same across platforms will make it
> easier for
> tools to read output, so as a general principle, I think this is a
> suboptimal solution to the issue. How about throwing something like
> this
> in MinGW specific header files?
>
> #define getppid() 0Hannes added something similar to the compat layer, so this commit is no longer needed. I'll remove it from the series and revert it in 4msysgit.
Steffen