Sponsored Content
Operating Systems Solaris putenv() doesnt really export the variable Post 302345741 by bhanug on Thursday 20th of August 2009 05:46:09 AM
Old 08-20-2009
Hi Jim, first of all..Thanx for the reply....
The code i am using has to link with shared libraries only. and other thing is that it is using set-uid. I read that when set-uid is used, the binary will ignore LD_LIBRARY_PATH and will look into only standard paths like /usr/lib. One option i am left with is to provide runtime path while compiling. Is there any other option... Please specify
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Export command giving Variable Name vs the Value set for the Variable

I'm having an issue when I export within my program. I'm getting the variable name, not the variable value. I have a configuration file (config.txt) that has the values of the variables set as so: set -a export ARCHIVEPOSourceDir="/interfaces/po/log /interfaces/po/data" export... (2 Replies)
Discussion started by: ParNone
2 Replies

2. UNIX for Dummies Questions & Answers

How to export the Display variable

I'm trying to open an xwindow on my Sun server. What am I doing wrong? # echo $SHELL /sbin/sh # # export DISPLAY=localhost:0.0 DISPLAY=localhost:0.0: is not an identifier Thank you! (1 Reply)
Discussion started by: FredSmith
1 Replies

3. Programming

problem while setting putenv

Hi, I m trying to change the env variable from the c program which inturn calls another c executable. i m using the putenv function but it does not set the value as required , it overwrites the values with some other values... i m using following cmd's to set the env variable FULL_PATH : ... (3 Replies)
Discussion started by: pgarg
3 Replies

4. Shell Programming and Scripting

Export variable as number

Hi Guys, I am using the korn shell. I have an environments files where I have defined a variable export START_TIME=060000 export END_TIME=220000 I source this environments file into one of my scripts. The problem is that when I try to use this variable, I cannot get to use this variable as a... (2 Replies)
Discussion started by: zeus101
2 Replies

5. Shell Programming and Scripting

Export Variable

How to export variable from one script to other? Can anybody give me syntax for that? Thanks (2 Replies)
Discussion started by: navi
2 Replies

6. Shell Programming and Scripting

Export variable

Hi I have a pass a variable from one script to another. Here are my scripts Script #1 ./profile #!/bin/sh export NAME="Hello" Script #2 ./test #!/bin/sh ./profile echo $NAME when I run ./test .. i am not getting anything .. why is that? (5 Replies)
Discussion started by: arex876
5 Replies

7. Shell Programming and Scripting

where does variable export to?

Hi, Unix Gurus, I have a problem need help. I have a script to generate environment variable code same as following: oracle_sid=abcd export oracle_sid when I execute this code with command ./script_nane it succeeded. when I try to find it with env command or echo $oracle_sid, it does not show... (5 Replies)
Discussion started by: ken002
5 Replies

8. Shell Programming and Scripting

Can't export variable

I am relatively new to exporting variables, and I just can't seem to make this count work. What I have is the following: TOTAL=$($IMAGELIST -backupid $IM -U |gawk '{print $5}' |tail -1)|gawk '{print $6}' RESTORED=$($BPDBJOBS -most_columns -jobid $JOBS |cut -f15 -d,) |gawk '{print $6}' export... (7 Replies)
Discussion started by: newbie2010
7 Replies

9. UNIX for Advanced & Expert Users

Need help export variable

Hi, Please find my code below. ps -xef | grep 14766 | awk 'BEGIN{X="java_home=";X="weblogic_home="} {for(i=1;i<=NF;i++){if($i ~ /-Dplatform\.home|java$/){split($i,P,"=");s=P?P:$i;print X""s}}}' echo "java_home="$java_home echo "weblogic_home="$weblogic_home Output: Why does... (3 Replies)
Discussion started by: mohtashims
3 Replies

10. Shell Programming and Scripting

Export command - variable

Hello, Please see the script found in my computer below. (Ubuntu 14.04) #!/bin/sh export APP_DIR="/home/appname" monitorscript="$APP_DIR""/monitor.sh" ps cax | grep monitor.sh > /dev/null if ; then echo "monitor.sh is running" else "$monitorscript" fi My question is regarding EXPORT... (3 Replies)
Discussion started by: baris35
3 Replies
MrmOpenHierarchy(3X)													      MrmOpenHierarchy(3X)

NAME
MrmOpenHierarchy - Allocates a hierarchy ID and opens all the UID files in the hierarchy SYNOPSIS
#include <Mrm/MrmPublic.h> Cardinal MrmOpenHierarchy(num_files, file_names_list, ancillary_structures_list, hierarchy_id) MrmCount num_files; String file_names_list[]; MrmOsOpenParamPtr *ancillary_structures_list; MrmHierarchy *hierarchy_id; DESCRIPTION
This routine is obsolete and exists for compatibility with previous releases. It is replaced by MrmOpenHierarchyPerDisplay. MrmOpenHierar- chy is identical to MrmOpenHierarchyPerDisplay except that MrmOpenHierarchy does not take a display argument. Specifies the number of files in the name list. Specifies an array of character strings that identify the UID files. A list of operating-system-dependent ancil- lary structures corresponding to such things as filenames, clobber flag, and so forth. This argument should be NULL for most operations. If you need to reference this structure, see the definition of MrmOsOpenParamPtr in <MrmPublic.h> for more information. Returns the search hierarchy ID. The search hierarchy ID identifies the list of UID files that MRM searches (in order) when performing subsequent fetch calls. Each UID file string in file_names_list can specify either a full pathname or a filename. If a UID file string has a leading slash (/), it specifies a full pathname, and MRM opens the file as specified. Otherwise, the UID file string specifies a filename. In this case MRM looks for the file along a search path specified by the UIDPATH environment variable or by a default search path, which varies depending on whether or not the XAPPLRESDIR environment variable is set. The UIDPATH environment variable specifies a search path and naming conventions associated with UID files. It can contain the substitution field %U, where the UID file string from the file_names_list argument to MrmOpenHierarchyPerDisplay is substituted for %U. It can also con- tain the substitution fields accepted by XtResolvePathname. The substitution field %T is always mapped to uid. The entire path is first searched with %S mapped to .uid and then, if no file is found, is searched again with %S mapped to NULL. If no display is set prior to calling this function, the result of this function's call to XtResolvePathname is undefined. For example, the following UIDPATH value and MrmOpenHierarchy call cause MRM to open two separate UID files: UIDPATH=/uidlib/%L/%U.uid:/uidlib/%U/%L static char *uid_files[] = {"/usr/users/me/test.uid", "test2"}; MrmHierarchy *Hierarchy_id; MrmOpenHierarchy((MrmCount)2,uid_files, NULL, Hierarchy_id) MRM opens the first file, /usr/users/me/test.uid, as specified in the file_names_list argument to MrmOpenHierarchy, because the UID file string in the file_names_list argument specifies a full pathname. MRM looks for the second file, test2, first as /uidlib/%L/test2.uid and second as /uidlib/test2/%L, where the display's language string is substituted for %L. After MrmOpenHierarchy opens the UID hierarchy, you should not delete or modify the UID files until you close the UID hierarchy by calling MrmCloseHierarchy. If UIDPATH is not set but the environment variable XAPPLRESDIR is set, MRM searches the following pathnames: %U%S $XAPPLRESDIR/%L/uid/%N/%U%S $XAPPLRESDIR/%l/uid/%N/%U%S $XAPPLRESDIR/uid/%N/%U%S $XAPPLRESDIR/%L/uid/%U%S $XAPPLRESDIR/%l/uid/%U%S $XAPPLRESDIR/uid/%U%S $HOME/uid/%U%S $HOME/%U%S /usr/lib/X11/%L/uid/%N/%U%S /usr/lib/X11/%l/uid/%N/%U%S /usr/lib/X11/uid/%N/%U%S /usr/lib/X11/%L/uid/%U%S /usr/lib/X11/%l/uid/%U%S /usr/lib/X11/uid/%U%S /usr/include/X11/uid/%U%S If neither UIDPATH nor XAPPLRESDIR is set, MRM searches the following pathnames: %U%S $HOME/%L/uid/%N/%U%S $HOME/%l/uid/%N/%U%S $HOME/uid/%N/%U%S $HOME/%L/uid/%U%S $HOME/%l/uid/%U%S $HOME/uid/%U%S $HOME/%U%S /usr/lib/X11/%L/uid/%N/%U%S /usr/lib/X11/%l/uid/%N/%U%S /usr/lib/X11/uid/%N/%U%S /usr/lib/X11/%L/uid/%U%S /usr/lib/X11/%l/uid/%U%S /usr/lib/X11/uid/%U%S /usr/include/X11/uid/%U%S These paths are defaults that vendors may change. For example, a vendor may use different directories for /usr/lib/X11 and /usr/include/X11. The following substitutions are used in these paths: The UID file string, from the file_names_list argument. The class name of the appli- cation. The display's language string. The language component of the display's language string. The suffix to the file name. The entire path is searched first with a suffix of .uil, and if no file is found, it is searched again with a NULL suffix. RETURN VALUES
This function returns one of these status return constants: The function executed successfully. File not found. The function failed. SEE ALSO
MrmOpenHierarchyPerDisplay(3X), MrmCloseHierarchy(3X) MrmOpenHierarchy(3X)
All times are GMT -4. The time now is 10:48 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy