9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Russ Cox <rsc@swtch.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu>
Subject: Re: [9fans] confusion about exits()
Date: Wed, 14 Sep 2005 09:11:23 -0400	[thread overview]
Message-ID: <ee9e417a050914061173f3d23b@mail.gmail.com> (raw)
In-Reply-To: <Pine.GSO.4.61.0509140851260.16337@cps210.cps.cmich.edu.>

> Under what circumstances does exits("All done.") will
> print the string? 

Never.  Just like exit(1) in Unix never prints "1".
You can get the exit status from wait (or by echo $status
in the shell).  If you want to print something too, use sysfatal.

> For program termination/abort purposes
> it seems to behave like exits(nil).

Except for setting the exit status, yes it does.

Russ


  reply	other threads:[~2005-09-14 13:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-14 12:54 ISHWAR RATTAN
2005-09-14 13:11 ` Russ Cox [this message]
2005-09-16 17:20   ` rog
2005-09-16 17:18     ` Russ Cox

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=ee9e417a050914061173f3d23b@mail.gmail.com \
    --to=rsc@swtch.com \
    --cc=9fans@cse.psu.edu \
    /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).