🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #3972

Re: EXIT_FAILURE problem

#3972
From: Mike Schilling
Date: Mon, 11 Sep 1995 22:14
24 lines
1272 bytes
Chris Torek (torek@elf.bsdi.com) wrote:
: This is, of course, a `quality of implementation' issue; a system that
: uses exit strings might want to provide a convenience function such as:
: 
: 	void exits(const char *status) {
: 		__libc_shutdown();
: 		__sys_exits(status);
: 	}
: 
: but clearly the Standard cannot require this.

Why couldn't the standard define another function called, say 

	void sys_exit(OS_RET_TYPE)

which does what exit does in terms of cleanup, and then exits with 
OS-specific exit status.  The standard couldn't specify the actual type
of OS_RET_TYPE, of course, or how to map OS-specific exit statuses into
C types.  Much of the usefulness of sys_exit *would* be a quality of 
implementation issue.  Still, writing largely portable programs which 
use OS-specific features where possible and appropriate would be far eaiser
if this kind of thing were encouraged and where possible mandated.

Mike
Technical Details
Message-ID: <1995Sep11.221423.6651@forte.com>
Path: arc1-ca.pugleaf.net!uucp3.netcom.com!forte!mikes
References: <42nsuq$bon@elf.bsdi.com>

Show Full Headers
Complete Article Headers
Newsgroups: comp.std.c
Path: arc1-ca.pugleaf.net!uucp3.netcom.com!forte!mikes
From: mikes@forte.com (Mike Schilling)
Subject: Re: EXIT_FAILURE problem
Message-ID: <1995Sep11.221423.6651@forte.com>
Organization: Forte Software Inc.
X-Newsreader: Tin 1.1 PL5
References: <42nsuq$bon@elf.bsdi.com>
Date: Mon, 11 Sep 1995 22:14:23 GMT