ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Tobias Burnus <burnus@net-b.de>
Subject: Re: feature request: texexec with exit code > 0
Date: Tue, 20 Jun 2006 11:51:50 +0200	[thread overview]
Message-ID: <4497C536.5080204@net-b.de> (raw)
In-Reply-To: <4497B7F3.8040209@wxs.nl>

Hello,

Hans Hagen wrote:
> � wrote:
>   
>> Hello,
>>
>> could "texexec --nonstopmode file" please exit with exit code > 0, if there
>> is an error (such as undefined control sequence)?
>>     
> well, if you figure out the codes -)
> i always have problems with finding the right exit codes (not that consistent between script languages and os's) 
>   
Under Unix it is classically zero == no error, not zero == error. Which
non-zero number is returned is application dependent.

The POSIX standard 2001 (Single Unix Standard v3; (c) Open Group) writes
in its "Shell & Utilities section":

"The EXIT STATUS section describes the values the utility shall return
to the calling program, or shell, and the conditions that cause these
values to be returned. Usually, utilities return zero for successful
completion and values greater than zero for various error conditions. If
specific numeric values are listed in this section, the system shall use
those values for the errors described. In some cases, status values are
listed more loosely, such as >0. A strictly conforming application shall
not rely on any specific value in the range shown and shall be prepared
to receive any value in the range."


According to the ISO C99  standard, the default exit code is also 0:

"If the return type of the main function is a type compatible with int,
a return from the
initial call to the main function is equivalent to calling the exit
function with the value
returned by the main function as its argument;[...] reaching the } that
terminates the
main function returns a value of 0."

I do not know what DOS programs are doing, though.

Tobias

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

  reply	other threads:[~2006-06-20  9:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-19 22:38 Peter Münster
2006-06-20  8:55 ` Hans Hagen
2006-06-20  9:51   ` Tobias Burnus [this message]
2006-06-20 10:44     ` Hans Hagen
2006-06-20 17:07   ` Peter Münster
2006-06-20 17:19     ` Hans Hagen
2006-06-20  9:07 ` Tobias Burnus
2006-06-21 16:34 ` Peter Münster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4497C536.5080204@net-b.de \
    --to=burnus@net-b.de \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).