Usenet comp.unix.osf.misc (1992-2004)
 help / color / mirror / Atom feed
From: heath@attica.ColumbiaSC.NCR.COM (Robert Heath)
Subject: Re: QUESTION: Is there concensus on where the posix shell should be?
Date: 1997/09/17	[thread overview]
Message-ID: <341fe71c.0@masters> (raw)
In-Reply-To: 5uaa12$982@nebula.mpn.com


I don't think there's a consensus for a standard directory in which the
POSIX shell resides.

In the Single UNIX Specification (a.k.a. UNIX95 or XPG4 UNIX) the exact 
path of the POSIX shell is not specified.  In fact, the standard 
typcally avoids specification of complete pathnames  altogether.

	Here are two possible solutions for finding the standard shell though: 

1) If your system has a "getconf" utility then type  

	getconf CS_PATH

		or 

	getconf PATH

   which produces a colon-separated list of directories, one of which 
   should contain the standard shell, named "sh".

2) At the `C' language programming interface, you can use

   	#include <unistd.h>

   	char buffer[2048];  /* more elegant solutions for sizing are possible */

   	confstr(_CS_PATH, buffer, sizeof(buffer));

   On return, buffer[] contains the colon-separated list of directories
   one of which should contain the standard shell, named "sh".


-- 
	Best,
	Robert Heath   
	"My Net... My Net... What have they done to my beautiful Internet?!"




      reply	other threads:[~1997-09-17  4:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-08-27  4:00 QUESTION: Is there concensus on where the posix shell should be? Christopher Rath
1997-08-28  4:00 ` Eric Levenez
1997-08-30  4:00   ` Stephen Harris
1997-09-17  4:00     ` Robert Heath [this message]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox