HP3000-L Archives

October 1997, Week 1

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Mark Bixby <[log in to unmask]>
Reply To:
Date:
Mon, 6 Oct 1997 15:22:38 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (31 lines)
Jeff Vance writes:
>
> > Mark Castoe <[log in to unmask]> wrote:
> > > I am working on an application which will run under both the MPE CI and
> > > the POSIX shell.  I need to be able to determine whether or not the app
> > > has been launched under the shell.  Is there an easy way to do this?  I
> > > have considered using HPFOPEN to open a file with an HFS filename and
> > > checking to see if it fails.

The HPFOPEN would always succeed if the HFS file existed.  HPFOPEN doesn't
care whether you're running under CI or sh.

> There may be some shell environment variables defined that are not defined
> under the CI.  But I like Lee's idea better.  If you get the process type
> you will see CI the *root* CI's is different than the shell's.  However,
> process type is not a reliable distinction since your app could be run from
> a second level CI.

I like the shell environment variable method better, because as Jeff mentions,
you may not be run directly underneath CI or sh.  Depending on which POSIX
stuff you're running, your process tree could be several levels deep.

So why is it important for the application to know whether it was launched
under CI or sh?
--
Mark Bixby                      E-mail: [log in to unmask]
Coast Community College Dist.   Web: http://www.cccd.edu/~markb/
District Information Services   1370 Adams Ave, Costa Mesa, CA, USA 92626-5429
Technical Support               +1 714 438-4647
"You can tune a file system, but you can't tune a fish." - tunefs(1M)

ATOM RSS1 RSS2