11-02-2009
Quote:
I have yet to find anything which defines it as threadsafe.
Actually, the relevant standards and specifications generally declare all APIs to be threadsafe except for a specified set which may (or may not) be threadsafe. For example, see POSIX.1-2008 S2.9.1
General Information
Cancellation points and async-cancel safety are a whole different issue and are not nearly as small a set of specified APIs.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi ,
I have three funcions f1, f2 and f3 .
f1 calls f2 and f2 calls f3 .
I have a global variable "period" which i want to pass to f3 .
Can i pass the variable directly in the definition of f3 ?
Pls help .
sars (4 Replies)
Discussion started by: sars
4 Replies
2. Shell Programming and Scripting
I have two scripts. script1.sh looks
--------------------------------
#!/bin/bash
display()
{
echo "Welcome to Unix"
}
display
-----------------------------
Script2.sh
#!/bin/bash
sh script1.sh //simply calling script1.sh
------------------------------ (1 Reply)
Discussion started by: mvictorvijayan
1 Replies
3. Shell Programming and Scripting
This is my function which is creating three variables based on counter & writing these variable to database by calling another function writeRecord
but only one record is getting wrote in DB.... Please advise ASAP...:confused:
function InsertFtg
{
FTGSTR=""
echo "Saurabh is GREAT $#"
let... (2 Replies)
Discussion started by: omkar.sonawane
2 Replies
4. Shell Programming and Scripting
I have the following code :
function1 ()
{
print "January"
}
function2()
{
case $1 in
January)
print "Dzisiaj mamy styczen"
;;
*)
;;
}
main()
{ (1 Reply)
Discussion started by: presul
1 Replies
5. Programming
In gdb, I can call one function with command "call", but how can I step in the function? I don't want to restart the program, but the function had been executed, gdb will execute next statement, and I don't know how to recall the function. (4 Replies)
Discussion started by: 915086731
4 Replies
6. Shell Programming and Scripting
I have a script which does gunzip, zip and untar.
Input to the script is file name and file directory (where file is located)
I am reading the input parameters as follows:
FILENAME=$1
FILEDIR=$2
I have created 3 functions that are as follows:
1) gunzip file
2) unzip file... (2 Replies)
Discussion started by: pinnacle
2 Replies
7. Shell Programming and Scripting
Dear All.
I have a script, which process files one by one. In the script I have two functions.
one sftp files to different server
the other from existing file create file with different name.
My question is:
Will sftp function recognize files names , which are created in another... (1 Reply)
Discussion started by: digioleg54
1 Replies
8. Shell Programming and Scripting
Hi,
I am having script which contains many functions. Need to print each function name at the starting of the function. Like below,
functionname()
{
echo "functionname"
commands....
}
I've tried like below,
func=`grep "()" scriptname | cut -d "(" -f1`
for i in $func
do
nawk -v... (4 Replies)
Discussion started by: Sumanthsv
4 Replies
9. Shell Programming and Scripting
updateEnvironmentField() {
linewithoutquotes=`echo $LINE | tr -d '"'`
b()
}
I want to pass variable named $linewithoutquotes to another method called b(), which is called from updateEnvironmentField() method. How to do the above requirement with shell script (1 Reply)
Discussion started by: pottic
1 Replies
10. Shell Programming and Scripting
Hi All,
Good Day, seeking for your assistance on how to not perform my 2nd, 3rd,4th etc.. function if my 1st function is in else condition.
#Body
function1()
{
if
then
echo "exist"
else
echo "not exist"
}
#if not exist in function1 my all other function will not proceed.... (4 Replies)
Discussion started by: meister29
4 Replies
intro(3) Library Functions Manual intro(3)
NAME
intro - Introduction to library functions
DESCRIPTION
Section 3 reference pages describe functions that may be found in various libraries. The library functions are those other than the func-
tions that directly invoke Tru64 UNIX system primitives, described in Section 2 reference pages.
Some reference pages in Section 3 may contain suffixes to allow their files to exist with those of other reference pages having the same
base name and section number. When used, suffixes are made up of one to four letters. See the man(1) reference page for more information on
suffixes.
To use the reentrant functions and data structures identified as "obsolete" in Section 3 reference pages, it is necessary to define the
preprocessor symbol _REENTRANT prior to including the associated include file. If this is not done, prototypes and supplementary data
structures for these functions may not be defined. This symbol is defined for you if you use the -threads or -pthread switches to the cc
or c89 command.
All libc functions are threadsafe unless otherwise indicated on their respective reference pages. The following table lists non-threadsafe
libc functions and their threadsafe equivalents (which are provided in libc.so for use in multithreaded applications):
-------------------------------------------
Not Threadsafe Threadsafe Equivalent
-------------------------------------------
asctime asctime_r
ctime ctime_r
endpwent endpwent_r
fgetgrent fgetgrent_r
fgetpwent fgetpwent_r
getgrent getgrent_r
getgrgid getgrgid_r
getgrname getgrname_r
getpwent getpwent_r
getpwnam getpwnam_r
getpwuid getpwuid_r
gmtime gmtime_r
localtime localtime_r
rand rand_r
readdir readdir_r
setpwent setpwent_r
strtok strtok_r
The following functions are not threadsafe and do not have threadsafe equivalents: registerrpc, svc_destroy, svc_freeargs, svc_getargs,
svc_getcaller, svc_getreq, svc_getreqset, svc_register, svc_run, svc_sendreply, svc_unregister, svcerr_auth, svcerr_decode, svcerr_noproc,
svcerr_noprog, svcerr_progvers, svcerr_systemerr, svcerr_weakauth, svcfd_create, svcraw_create, svctcp_create, svcudp_create, xprt_regis-
ter, xprt_unregister
ERRORS
Functions in the math library may return conventional values when the function is undefined for the given arguments or when the value is
not representable. In these cases, the external variable errno is set to the value of EDOM (domain error) or ERANGE (range error). For
further information, see intro(2). The values of EDOM and ERANGE are defined in the include file <math.h>.
FILES
/usr/lib/libc.a
/usr/lib/libcP.a
/usr/lib/libm.a
/usr/lib/libcV.a
RELATED INFORMATION
cc(1), ld(1), nm(1), intro(2) delim off
intro(3)