06-19-2008
Scope of AIX
What is the scope of AIX as I am starting my career as a fresher in AIX administration??
This User Gave Thanks to abhishek27 For This Post:
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. Programming
I've been wondering if I can make mutexes much easier to use in C++ with creative use of a locking class and variable scope, but I'm not sure if things happen in the order I want. Here's pseudocode for something that could use the class:
int someclass::getvalue()
{
int retval;
... (0 Replies)
Discussion started by: Corona688
0 Replies
3. Programming
Each thread has a copy of auto variables within a function, but variables
declared as static within a function are common to all threads. To circumvent
this can static variables be placed outside the function. If so, will the
scope of the variable be file only or will it be extern, and will each... (7 Replies)
Discussion started by: sundaresh
7 Replies
4. Shell Programming and Scripting
I call my script with two parameters
myscript.sh aaa bbb
What is the way to access $1 and $2 values inside a function? I call the function like this
myfuntion $1 $1
but inside of the function, $1 and $2 are empty. Any suggestions? thank you in advanced. (1 Reply)
Discussion started by: aristegui
1 Replies
5. 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
6. 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
7. 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
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. AIX
I am mac end user learn some shell and applescripting
I am looking AIX as system admin as career and learning AIX p520
what is scope of AIX as admin and about technology in demand in market
I am confused, can anybody from AIX elaborate or mail me some experience
please: (1 Reply)
Discussion started by: himanshuk
1 Replies
10. UNIX for Advanced & Expert Users
Hi all
I have a script that listens on a named pipe. That all works fine but I want to trap any kill signals and make sure I delete the named pipe on exit.
I can delete it fine exiting normally but cannot get the trap to see the variable holding the pipe name -
trap "rm -f ${PIPE};exit"... (1 Reply)
Discussion started by: steadyonabix
1 Replies
LEARN ABOUT DEBIAN
scope::guard
Scope::Guard(3pm) User Contributed Perl Documentation Scope::Guard(3pm)
NAME
Scope::Guard - lexically-scoped resource management
SYNOPSIS
my $guard = guard { ... };
# or
my $guard = scope_guard &handler;
# or
my $guard = Scope::Guard->new(sub { ... });
$guard->dismiss(); # disable the handler
DESCRIPTION
This module provides a convenient way to perform cleanup or other forms of resource management at the end of a scope. It is particularly
useful when dealing with exceptions: the "Scope::Guard" constructor takes a reference to a subroutine that is guaranteed to be called even
if the thread of execution is aborted prematurely. This effectively allows lexically-scoped "promises" to be made that are automatically
honoured by perl's garbage collector.
For more information, see: <http://www.drdobbs.com/cpp/184403758>
METHODS
new
my $guard = Scope::Guard->new(sub { ... });
# or
my $guard = Scope::Guard->new(&handler);
The "new" method creates a new "Scope::Guard" object which calls the supplied handler when its "DESTROY" method is called, typically at the
end of the scope.
dismiss
$guard->dismiss();
# or
$guard->dismiss(1);
"dismiss" detaches the handler from the "Scope::Guard" object. This revokes the "promise" to call the handler when the object is destroyed.
The handler can be re-enabled by calling:
$guard->dismiss(0);
EXPORTS
guard
"guard" takes a block and returns a new "Scope::Guard" object. It can be used as a shorthand for:
Scope::Guard->new(...)
e.g.
my $guard = guard { ... };
Note: calling "guard" anonymously, i.e. in void context, will raise an exception. This is because anonymous guards are destroyed
immediately (rather than at the end of the scope), which is unlikely to be the desired behaviour.
scope_guard
"scope_guard" is the same as "guard", but it takes a code ref rather than a block. e.g.
my $guard = scope_guard &handler;
or:
my $guard = scope_guard sub { ... };
or:
my $guard = scope_guard $handler;
As with "guard", calling "scope_guard" in void context will raise an exception.
VERSION
0.20
SEE ALSO
o B::Hooks::EndOfScope
o End
o Guard
o Hook::Scope
o Object::Destroyer
o Perl::AtEndOfScope
o ReleaseAction
o Scope::local_OnExit
o Scope::OnExit
o Sub::ScopeFinalizer
o Value::Canary
AUTHOR
chocolateboy <chocolate@cpan.org>
COPYRIGHT
Copyright (c) 2005-2010, chocolateboy.
This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself.
perl v5.10.1 2010-05-16 Scope::Guard(3pm)