* [9fans] confusion about exits()
@ 2005-09-14 12:54 ISHWAR RATTAN
2005-09-14 13:11 ` Russ Cox
0 siblings, 1 reply; 4+ messages in thread
From: ISHWAR RATTAN @ 2005-09-14 12:54 UTC (permalink / raw)
To: 9fans
Under what circumstances does exits("All done.") will
print the string? For program termination/abort purposes
it seems to behave like exits(nil).
-ishwar
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [9fans] confusion about exits()
2005-09-14 12:54 [9fans] confusion about exits() ISHWAR RATTAN
@ 2005-09-14 13:11 ` Russ Cox
2005-09-16 17:20 ` rog
0 siblings, 1 reply; 4+ messages in thread
From: Russ Cox @ 2005-09-14 13:11 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-09-16 17:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-14 12:54 [9fans] confusion about exits() ISHWAR RATTAN
2005-09-14 13:11 ` Russ Cox
2005-09-16 17:20 ` rog
2005-09-16 17:18 ` Russ Cox
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).