f



How to programmatically set EXTSHM=ON for shmat()

Hi,

I am looking for a way of setting EXTSHM=ON programmatically (in C)
such that it is recognised by shmat() calls in the same process (yes I
know it can be set in the environment at the shell level, but I don't
want to do that, I want it built into the application, library etc.). I
am using AIX 5.x. (see the shmat() man page for information about the
effect of setting the environment variable EXTSHM)

Simply coding a 'putenv("EXTSHM=ON")' only works for a subsequent
shmat() call if there is an exec() call after the putenv().

One kludgy way I have found (for a simple application) is to re-exec()
the main() of the program with EXTSHM=ON set, but this technique is not
suitable for hiding away in a library.

Does anybody know of any other way?

Thanks,
Greg

0
gregn2211 (2)
1/10/2006 5:25:30 AM
comp.unix.aix 10959 articles. 1 followers. drkirkby (98) is leader. Post Follow

2 Replies
474 Views

Similar Articles

[PageSpeed] 0

gregn2211 wrote:
> I am looking for a way of setting EXTSHM=ON programmatically (in C)
> such that it is recognised by shmat() calls in the same process (yes I
> know it can be set in the environment at the shell level, but I don't
> want to do that, I want it built into the application, library etc.).

You can't.  It takes effect at exec time, and by then it's too late.
You either set it in your shell, or use putenv/exec, or use a
shell script wrapper for your application.  No other options.

> the main() of the program with EXTSHM=ON set, but this technique is not
> suitable for hiding away in a library.

Why on earth are you trying to hide on OS-level setting?  If your
code requires EXTSHM, document the requirement and get on with
your life.
0
noway (263)
1/12/2006 3:24:20 AM
Hi Gary,

I just think the usage of this EXTSHM environment variable is kludgy,
and the developers of AIX could have achieved the same thing in a much
better way using an API or maybe even a linker option etc. (considering
that EXTSHM has performance ramifications and setting it can actually
break existing applications). Other UNIXes dont have such a restriction
on the number of shared memory segments used by an app, and even if
they did, they certainly wouldn't control it using an environment
variable. That's why I am trying to hide it, because I dont want to
have the requirement that some stupid environment variable be set prior
to running the software, the software should be able to set it itself.
Obviously a shell script wrapper is OK for confining the setting to a
particular application, but if you are just writing a plugin library to
an existing application, then that's not really an option.
Anyway, thanks for your input. At the least, I can check if EXTSHM is
not set, and issue an error message.

Greg

0
gregn2211 (2)
1/15/2006 10:59:08 PM
Reply:

Similar Artilces:

Difference between HP Unix and Unix AIX
What are the difference between HP Unix and HP AIX at command line ??? Is there any ? dlprogress wrote: > What are the difference between HP Unix and HP AIX at command line ??? > Is there any ? > > Unless you're getting into system dependent stuff, no, there's no real difference. However, one real difference is that AIX is an IBM and not an HP product. -- Fletcher Glenn ...

Algorithm to combine or-sets of and-sets, where each element of an and-set is an or-set of and-sets
As part of an abduction procedure, see http://code.google.com/p/biohacker/source/browse/trunk/BPS/ltms/abduction.lisp if interested, I need to efficiently solve the following problem: Given an or-set of and-sets, for example, (:OR (:AND A B C) (:AND D E A)) and given a dictionary, where each element of an and-set is listed, with another or-set of and-sets as value, for example, A -> (:OR (:AND 1 2) (:AND 3 4)) B -> (:OR (:AND 2 3) (:AND 4)) C -> (:OR (:AND 1) (:AND 3)) D -> (:OR (:AND 1) (:AND 3 4)) E -> (:OR (:AND 1 2) (:AND 3)) find a new minimal or-set of and-set consistent,...

Setting and more Settings
I have a Epson 4990 and a spyder2 express. The Epson twain configuration allows me to set color control in one of three ways 1. continuous auto exposure. on this option you must set a gamma value from 1.0 to 3.0 (in 0.1 increments) 2. ICM With a source and a target. The source is locked as (EPSON standard) The target has a choice of monitorRGB or sRGB 3. No color correction What would be the best choice for the above options ? Also, given the fact that I am using the spyder2 to load Monitor calibration settings into my video card at windows ...

Set of sets
Is there a Latex (or indeed a mathematical) symbol for 'the set of sets'? Cheers. On Jun 19, 10:43=A0am, "Axis" <zedc...@hotmail.co.uk> wrote: > Is there a Latex (or indeed a mathematical) symbol for 'the set of sets'? > > Cheers. I'm not sure what you mean. I'd write something like B=3D\{A_1,\ldots,A_T\} "Joris" <pinkse@gmail.com> wrote in message news:583b3c5c-a019-4be7-a936-876f06160b05@l28g2000vba.googlegroups.com... On Jun 19, 10:43 am, "Axis" <zedc...@hotmail.co.uk> wrote: > Is there a Latex (...

sets of sets
I'm trying to read a recent paper I found at http://csr.uvic.ca/~vanemden/Publications/STPCS.pdf (The description intrigued me because the author is exploring RT. I'll try to contact the author with my question, but I thought I'd mention it here as others may be interested.) Anyway, at the top of page 5, he defines something I can only call "UNION S" (since I don't know know how to type the set union operator symbol). Can anybody suggest whether I'm reading it right? What I think it says in prose is "the set of x such that x is a member...

set of sets
I thought rewriting __hash__ should be enough to avoid mutables problem but: class H(set): def __hash__(self) return id(self) s=H() f=set() f.add(s) f.remove(s) the add succeeds the remove fails eventually not calling hash(s). Thanks for help Paolino ___________________________________ Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB http://mail.yahoo.it Paolino wrote: > I thought rewriting __hash__ should be enough to avoid mutables problem > but: > > class H(set): > def __hash__(self) > return id(self) > > s=H() > >...

Unix AIX
What is the best way to clear semaphores and shared memory, sometimes we run those ipcs and ipcrm commands but some of them do not go away and the server hangs, i would apprecaite a list of commands for unix aix, we are on version 6.1 Thanks!! SAPUNIX wrote: > What is the best way to clear semaphores and shared memory, sometimes > we run those ipcs and ipcrm commands but some of them do not go away > and the server hangs those who do not go away, are they really not in use anymore? In comp.unix.aix, Sven Mascheck <mascheck@email.invalid> wrote: >SAPUNIX wrote: >> W...

UNIX ACL MASK gets set to --- when recreating a data set
We strictly enforce the use of directory and file security by the use of ACLs on our SOLARIS system. Directories are created with ACLs restricting entry to a small group of users with defaults for new files created within that directory. When SAS creates a new data set (something as simple as ... data lib.a ; set sashelp.class ;run;) the FIRST TIME, the defaults are adopted for that new file as expected. However, when recreating a dataset (same program as above, expecting SAS to delete and recreate the file), the MASK for the new file is set to whatever the default for the GROUP is, rathe...

Need to convert DOS to UNIX with a *limited* set of UNIX commands
I'm stuck! Need to do a text replace in files to convert them from DOS into equivalent UNIX format (i.e. get rid of all the ^M characters). But am using a system that has a BusyBox UNIX implementation on it that supports a very limited set of unix commands. These are: alias break builtin cd chdir continue eval exec exit export false fc hash help jobs let local pwd read readonly return set setvar shift times trap true type ulimit umask unalias unset wait [ ash basename busybox cat chmod cp cut df dmesg du echo env false find free freeramdisk halt hostid hostname init kill killall ln logger...

US-TX-Austin: Application Developer-AIX, AIX, UNIX; 7M (45304132401)
US-TX-Austin: Application Developer-AIX, AIX, UNIX; 7M (45304132401) ==================================================================== Position: Application Developer-AIX Reference: MKL00780 Location: Austin TX Duration: 7M Skills: AIX UNIX Scope: Unix AIX preferred system admin skills and experience. Experience configuring all types of servers, storage and networks. Excellent written communication skills must be able to clearly describe a problem and resolution status Flexibl...

US-TX-Austin: Application Developer-AIX, AIX, UNIX; 7M (45304457606)
US-TX-Austin: Application Developer-AIX, AIX, UNIX; 7M (45304457606) ==================================================================== Position: Application Developer-AIX Reference: MKL00780 Location: Austin TX Duration: 7M Skills: AIX UNIX Scope: Unix AIX preferred system admin skills and experience. Experience configuring all types of servers, storage and networks. Excellent written communication skills must be able to clearly describe a problem and resolution status Flexibl...

US-TX-Austin: Application Developer-AIX, AIX, UNIX; 7M (45304732416)
US-TX-Austin: Application Developer-AIX, AIX, UNIX; 7M (45304732416) ==================================================================== Position: Application Developer-AIX Reference: MKL00780 Location: Austin TX Duration: 7M Skills: AIX UNIX Scope: Unix AIX preferred system admin skills and experience. Experience configuring all types of servers, storage and networks. Excellent written communication skills must be able to clearly describe a problem and resolution status Flexibl...

US-TX-Austin: Application Developer-AIX, AIX, UNIX; 7M (45304157603)
US-TX-Austin: Application Developer-AIX, AIX, UNIX; 7M (45304157603) ==================================================================== Position: Application Developer-AIX Reference: MKL00780 Location: Austin TX Duration: 7M Skills: AIX UNIX Scope: Unix AIX preferred system admin skills and experience. Experience configuring all types of servers, storage and networks. Excellent written communication skills must be able to clearly describe a problem and resolution status Flexibl...

US-TX-Austin: Application Developer-AIX, AIX, UNIX; 7M (45304757604)
US-TX-Austin: Application Developer-AIX, AIX, UNIX; 7M (45304757604) ==================================================================== Position: Application Developer-AIX Reference: MKL00780 Location: Austin TX Duration: 7M Skills: AIX UNIX Scope: Unix AIX preferred system admin skills and experience. Experience configuring all types of servers, storage and networks. Excellent written communication skills must be able to clearly describe a problem and resolution status Flexibl...

Web resources about - How to programmatically set EXTSHM=ON for shmat() - comp.unix.aix


[...] How to Programmatically Administer Off-Facebook Pages with the Open Graph API - Inside Facebook ...
With the Open Graph protocol that Facebook announced at last week’s f8 conference, any URL can now be treated just like a Facebook Page. After ...

Pandora Is Auctioning Off Its In-App Banner Ads Programmatically
Advertisers can now buy banner ads to run in Pandora's mobile apps as easily as they can book a flight on Kayak. The streaming radio service ...

Time Inc. Sells Print Ads Programmatically
Time Inc. is stepping into the future of advertising. The company is now allowing advertisers to use programmatic advertising — the buying and ...

Wesabe makes Financial Data available programmatically - Scott Hanselman
Scott Hanselman on Programming, User Experience, The Zen of Computers and Life in General

Thanks To Social, Advertisers Plan To Spend More Programmatically In 2016
New State of the Industry report from AdRoll also highlights trends in attribution and mobile retargeting. Please visit Marketing Land for the ...

IPG Begins Buying Local Broadcast Programmatically: Can Target, Retarget Viewers In Near Real-Time
In what likely is the most significant development yet to bring programmatic media-buying to local broadcast television, Interpublic's Mediabrands ...

Google Launches Cloud SQL API To Allow Developers To Manage Their Databases Programmatically
... to use Google’s admin interface. Today, however, Google is launching the Cloud SQL API . This new REST API will allow developers to programmatically ...

Are Programmatically Purchased Native Ads Native Enough?
It seems everyone and their mothers are pushing native ad units and tools to support them. Facebook, Twitter, Yahoo and most recently AOL all ...

Most Major U.S. Publishers Now Sell Ads Programmatically
Most major online publishers in the U.S. now sell at least some of their ad space using automated "programmatic" technology, according to new ...

Nearly Half Of Digital Display Now Sold Programmatically: Magna Global
So-called “programmatic” software platforms, which let advertising buyers and sellers agree terms for ad inventory in real-time and using customer ...

Resources last updated: 2/9/2016 7:44:51 AM