Re: make signal text descriptions

2003-10-29 Thread J. Grant
Hello,

Thank you for your email.

on the 29/10/03 00:03, Paul D. Smith wrote:
%% "J. Grant" <[EMAIL PROTECTED]> writes:

  jg> Could the signals and errors that Make displays include the text
  jg> description of them?  The same way that other programs do not
  jg> return the errno.h value, but the text that it corresponds too.
  jg> e.g.:

  jg> Signal 127

GNU make does print the signal number as long as it can determine the
right one.  If you are seeing this, then it means GNU make got a signal
it couldn't translate.  This often means that the configuration for your
system was inaccurate, or that your system doesn't provide proper signal
translation facilities.
Since you don't specify what type of system you're working on I can't
give more help than that, but your next example seems to imply it's DOS,
Windows, or similar.  In that case you should check on the
[EMAIL PROTECTED] mailing list and see whether signal translation has
been ported to work on DOS/Windows platforms.
ok, I've cc [EMAIL PROTECTED], so maybe someone can tell me if signal 
numbers are decoded.  Would you include this internally? or use a lib etc?

  jg> z:\bin\make.exe: *** [mak19] Error 255

It is not appropriate for make to translate this code into an errno
value, because it is _NOT_ an errno value.
This code is the return value from the program that make invoked, and
that return value is virtually never an errno value.
Ok, sorry, I was only giving errno.h as an example, I misunderstood and 
thought these were make specific signals.

In the example you give here, for example, the invoked program exited
with a -1 exit code, which is not a valid errno value.
Is there any reason this is printed as unsigned char then?  Would not -1 
be more appropriate if that was what it was originally?

Kind regards

JG



___
Bug-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-make


Re: make signal text descriptions

2003-10-29 Thread Paul D. Smith
%% "J. Grant" <[EMAIL PROTECTED]> writes:

  jg> ok, I've cc [EMAIL PROTECTED], so maybe someone can tell me if
  jg> signal numbers are decoded.  Would you include this internally? or
  jg> use a lib etc?

We use the system service to translate the code if the system provides
it (many UNIX systems provide strsignal() for example).  If not we have
a predefined set of signals we translate, but if the signal is not a
member of that predefined list it's not translated.

  >> In the example you give here, for example, the invoked program
  >> exited with a -1 exit code, which is not a valid errno value.

  jg> Is there any reason this is printed as unsigned char then?  Would
  jg> not -1 be more appropriate if that was what it was originally?

Because the POSIX standard defines the exit code of an application to be
an 8-bit value, not a signed integer.

-- 
---
 Paul D. Smith <[EMAIL PROTECTED]>  Find some GNU make tips at:
 http://www.gnu.org  http://make.paulandlesley.org
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist


___
Bug-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-make


Re: make signal text descriptions

2003-10-29 Thread Eli Zaretskii
> Date: Wed, 29 Oct 2003 21:07:39 +
> From: "J. Grant" <[EMAIL PROTECTED]>
> 
> ok, I've cc [EMAIL PROTECTED], so maybe someone can tell me if signal 
> numbers are decoded.  Would you include this internally? or use a lib etc?

The signal names are decoded if the underlying library supports them.

What port of Make, specifically, do you use?


___
Bug-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-make


Re: make signal text descriptions

2003-10-29 Thread J. Grant
Hello,

What port of Make, specifically, do you use?
Hello, I am using a native win32 build I created of 3.80.

Kind regards

JG



___
Bug-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-make


Re: make signal text descriptions

2003-10-29 Thread J. Grant
Hello,

We use the system service to translate the code if the system provides
it (many UNIX systems provide strsignal() for example).  If not we have
a predefined set of signals we translate, but if the signal is not a
member of that predefined list it's not translated.
ok, I wonder if win32 has extra signals, this code 127, could these be 
supported for win32 ports?


Because the POSIX standard defines the exit code of an application to be
an 8-bit value, not a signed integer.
It is odd that "int main(void)" is commonly used then, as int is 
typically a signed type.

Kind regards

JG



___
Bug-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-make


Re: make signal text descriptions

2003-10-29 Thread Earnie Boyd
J. Grant wrote:
Hello,

We use the system service to translate the code if the system provides
it (many UNIX systems provide strsignal() for example).  If not we have
a predefined set of signals we translate, but if the signal is not a
member of that predefined list it's not translated.


ok, I wonder if win32 has extra signals, this code 127, could these be 
supported for win32 ports?

#define SIGINT  2   /* Interactive attention */
#define SIGILL  4   /* Illegal instruction */
#define SIGFPE  8   /* Floating point error */
#define SIGSEGV 11  /* Segmentation violation */
#define SIGTERM 15  /* Termination request */
#define SIGBREAK21  /* Control-break */
#define SIGABRT 22  /* Abnormal termination (abort) */
#define NSIG 23 /* maximum signal number + 1 */

Earnie
--
http://www.mingw.org
Powered by SourceForge 


___
Bug-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-make


Re: make signal text descriptions

2003-10-29 Thread J. Grant
Hi Earnie,

ok, I wonder if win32 has extra signals, this code 127, could these be 
supported for win32 ports?

#define SIGINT  2   /* Interactive attention */
#define SIGILL  4   /* Illegal instruction */
#define SIGFPE  8   /* Floating point error */
#define SIGSEGV 11  /* Segmentation violation */
#define SIGTERM 15  /* Termination request */
#define SIGBREAK21  /* Control-break */
#define SIGABRT 22  /* Abnormal termination (abort) */
#define NSIG 23 /* maximum signal number + 1 */

Earnie


I noticed on this list list they talk about it being a failed exec:

http://www.cygwin.com/ml/cygwin/2003-06/msg00674.html

If it is a failed exec, could this be added to the list.. if it is 
convention on win32.

My win32 build of make is compiled with BATCH_MODE_ONLY_SHELL, and it 
uses my sh.exe when in --jobs mode.  It only has this signal error every 
few days.  Unsure what is causing it. the command runs fine if I run it 
from a .bat file, or in terminal etc.

Kind regards

JG



___
Bug-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-make


Re: make signal text descriptions

2003-10-29 Thread Eli Zaretskii
> Date: Thu, 30 Oct 2003 00:02:55 +
> From: "J. Grant" <[EMAIL PROTECTED]>
> 
> I noticed on this list list they talk about it being a failed exec:
> 
> http://www.cygwin.com/ml/cygwin/2003-06/msg00674.html

I doubt if this is a signal.  It's more probably an error code from a
library function that tries to launch a subsidiary process and fails.

In other words, if I'm right, some Windows-specific code fails to
distinguish between a subprocess being terminated due to a signal and
a failure to run the subprocess.  A bug that needs to be fixed.



___
Bug-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-make