06-23-2006
static globals have a scope of "file". Each thread will not get it's own copy.
In short, DO NOT use static variables for thread programming.
10 More Discussions You Might Find Interesting
1. Programming
I'm having a problem getting this to work..
I got 3 files,
start.C - Where i got my main() function
Menu.C & Menu.h - Where I'm trying to use hash_map
start.C
#include <iostream>
#include "Menu.h"
using namespace std;
int main() { /* test code here */ return 0; }
Menu.h ... (1 Reply)
Discussion started by: J.P
1 Replies
2. AIX
What is the scope of AIX as I am starting my career as a fresher in AIX administration?? (4 Replies)
Discussion started by: abhishek27
4 Replies
3. Shell Programming and Scripting
Hi ,
I'm trying to change the variable value in a while loop , however its not working it seems that the problem with subshells while reading the file.
#!/bin/sh
FLAG=0;
cat filename | while read data
do
FLAG=1;
done
echo $FLAG
Should display 1 instead displays 0 (13 Replies)
Discussion started by: dinjo_jo
13 Replies
4. Shell Programming and Scripting
Hi All,
I am new to unix shell scripting,
in the below script "num" is an input file which contains a series of numbers example :
2
3
5
8
I want to add the above all numbers and want the result finally outside the while loop. it prints the value zero instead of the actual expected... (13 Replies)
Discussion started by: nagnatar
13 Replies
5. Shell Programming and Scripting
Hi,
I want to know about the variable scope in shell script.
How can we use the script argument inside the function?
fn () {
echo $1 ## I want this argument should be the main script argument and not the funtion argument.
}
also are there any local,global types in shell script?
if... (3 Replies)
Discussion started by: shellwell
3 Replies
6. AIX
Hello All,
I am getting this error while compiling my application on IBM AIX 5.3.
As I tried to define _XOPEN_SOURCE=500 in makefile, that didn't work.
Please help us to resolve the error. (0 Replies)
Discussion started by: mustus
0 Replies
7. Shell Programming and Scripting
Friends,
I am using ksh under SunoS. This is what I have
In file1.sh
NOW=$(date +"%b-%d-%y")
LOGFILE="./log-$NOW.log"
I will be using this file through file1.sh as log file.
I have another script file2.sh which is being called inside my file1.sh. I would like to use the same log... (6 Replies)
Discussion started by: dahlia84
6 Replies
8. Shell Programming and Scripting
I am trying to use bc to calculate the difference between two nano second time stamps. bc does the calculation but seems to ignore the scale option:
micro_start=$(date +%s.%N)
# .. some stuff happens here
micro_stop=$(date +%s.%N)
TOT=$(echo "scale=3; $micro_stop - $micro_start" | bc)... (2 Replies)
Discussion started by: LostInTheWoods
2 Replies
9. Shell Programming and Scripting
Hi,
I use Korn Shell. Searched Forum and modified the way the file is input to the while loop, but still the variable does not seem to be retaining the final count.
while read name
do
Tmp=`echo $name | awk '{print $9 }'`
Count=`cat $Tmp | wc -l`... (6 Replies)
Discussion started by: justchill
6 Replies
10. Shell Programming and Scripting
Hello! Before you "bash" me with
- Not another post of this kind
Please read on and you will understand my problem...
I am using the below to extract a sum of the diskIO on a Solaris server.
#!/bin/sh
PATH=/usr/bin:/usr/sbin:/sbin; export PATH
TEMP1="/tmp/raw-sar-output.txt$$"... (3 Replies)
Discussion started by: haaru
3 Replies
LEARN ABOUT OSF1
dxmcolormixgetnewcolor
DXmColorMixGetNewColor(3X) DXmColorMixGetNewColor(3X)
NAME
DXmColorMixGetNewColor - Retrieves (returns) the color mixing widget's current new color red, green, and blue values.
SYNOPSIS
void DXmColorMixGetNewColor(
DXmColorMixWidget cmw,
unsigned short *red,
unsigned short *green,
unsigned short *blue );
PARAMETERS
The widget identifier of the color mixing widget. A pointer to the returned new color red value. A pointer to the returned new color
green value. A pointer to the returned new color blue value.
A complete list of all the X color values available to you is located on your system. To find it, type the following command: % find /
-name '*rgb*' -print
DESCRIPTION
DXmColorMixGetNewColor allows the calling application or routine to quickly obtain the current color value from the color mixing widget.
Note that if your application uses the default color mixing subwidget, the application will perform this operation faster if you call this
routine instead of the Intrinsic routine XtGetValues.
SEE ALSO
DXmColorMixSetNewColor(3X), DXmCreateColorMix(3X), DXmCreateColorMixDialog(3X)
DXmColorMixGetNewColor(3X)