bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug] sdiff-2.8.1: wrong subsidiary program check


From: Paul Eggert
Subject: Re: [Bug] sdiff-2.8.1: wrong subsidiary program check
Date: Thu, 5 Sep 2002 00:28:16 -0700 (PDT)

> From: Takashi Matsuda <address@hidden>
> Date: Thu, 5 Sep 2002 11:19:10 +0900
> 
> In my environment (cygwin 1.3.12), sdiff aborts execution finally,
> saying "subsidiary program `...' failed", even if it seems run
> normally.
> 
> I read the source of sdiff 2.8.1 and found one problem.
> In the function "sdiff.c:1220:ck_editor_status()", it check the
> error situation by the code "if (errno | status)".
> IMHO, "status == 0" does not meen the normal situation in all 
> environment, at least cygwin.

Can you please explain the situations in Cygwin where status != 0
but the program ran normally?

What are the values in config.h for HAVE_WORKING_FORK and
HAVE_WORKING_VFORK?

I am thinking of changing ck_editor_status to be the following; would
this fix things for you?

static void
ck_editor_status (int errnum, int status)
{
  if (errnum | status)
    {
      error (0, errnum,
             _((errnum || ! WIFEXITED (status)
                || WEXITSTATUS (status) < 126 || 127 < WEXITSTATUS (status))
               ? "subsidiary program `%s' failed"
               : WEXITSTATUS (status) == 126
               ? "subsidiary program `%s' could not be invoked"
               : "subsidiary program `%s' not found"),
             editor_program);
      exiterr ();
    }
}




reply via email to

[Prev in Thread] Current Thread [Next in Thread]