Sponsored Content
Full Discussion: Variable initialization
Top Forums Shell Programming and Scripting Variable initialization Post 302906769 by kekanap on Monday 23rd of June 2014 11:39:58 AM
Old 06-23-2014
Thank you Corona,

I am using Redhat Linux and your suggestion works but how do I initialize variable B?
 

10 More Discussions You Might Find Interesting

1. Programming

Struct Initialization

Hi We are using a code generator for initializing structures with the #define macro. Compiling it with the GCC 2.8.1 (with -ansi) it OK. But when we are using the SUN C 5.0 compiler it screams. Following is a code sample: #include <stdlib.h> #include <stdio.h> typedef struct TEST3 {... (4 Replies)
Discussion started by: amatsaka
4 Replies

2. UNIX for Dummies Questions & Answers

Help regarding storing the initialization parameters

Hi all, In my shell script, I am reading some files, processing them, and writing the out-put in the log files. The out put contains number of rows in the file etc. I want to fetch the input files from a particular directory and I want to write the logs in a particular directory with a particular... (1 Reply)
Discussion started by: VENC22
1 Replies

3. UNIX for Dummies Questions & Answers

Shell initialization files

As you know, when a user logs in, the shell reads the initialization files in an order something like below... ################### Bourne Shell /etc/profile > $HOME/.profile Bash Shell /etc/profile > $HOME/.bash_profile > $HOME/.bash_login > $HOME/.profile > $HOME/.bashrc C Shell... (3 Replies)
Discussion started by: SeanWuzHere
3 Replies

4. Programming

Char initialization

Hi All, char a="\0"; a) a contains \0 a contains garbage value b) a contains \ a contains 0 a contains garbage value Pls, let me know correct result is a or b. I guess a. Thanks, Naga:cool: (2 Replies)
Discussion started by: Nagapandi
2 Replies

5. Shell Programming and Scripting

little confusion about variable initialization.

Whenever i execute the below scriptlet with out proper file name it deletes /tmp directory . I guess this is because value of variable a didnt get initialized and there for rm -rf /tmp/ get executed and entire /tmp directory get deleted. How would i avoid any empty variables to be used in... (9 Replies)
Discussion started by: pinga123
9 Replies

6. Programming

Class Pointer initialization C++

Hello everyone, I have a question, that are the following ways of pointer intialization same ? ClassA *point; point = 0; point = new ClassA; Thanks a load in advance!! Regards, (10 Replies)
Discussion started by: mind@work
10 Replies

7. Shell Programming and Scripting

Initialization error

new to shell scripting. below line is showing error in script. ${parameter:=word} in the o/p first it shows the below error. word: not found. and then in next line print "word" ---------------- p2: word: not found. word --------------------------- OS is AIX and shell is... (12 Replies)
Discussion started by: scriptor
12 Replies

8. UNIX for Advanced & Expert Users

openmpi - initialization failed

Hi everybody, my problem is the following: I'm trying to run an openmpi program on a cluster (atlasz.elte.hu, it's in hungarian, but you can try google translate), but I always got this error: Fatal error in MPI_Init: Other MPI error, error stack: MPIR_Init_thread(394)...........:... (0 Replies)
Discussion started by: jkobori
0 Replies

9. Programming

C- static initialization of structures

Situation: I have an array of structures: struct my_struct_type { char tags_sn; char group_c; char is_err_c; }; struct my_struct_type stuff = { "abcd", 'A', 'E', "efgh", 'B', 'E', "ijkl", 'C', 'E' NULL, '\0', '\0' ... (14 Replies)
Discussion started by: garysk
14 Replies

10. Shell Programming and Scripting

Error occurred during initialization of VM

Hi , I was invoking a sh file using the nohup command. But while invoking, I received a below error. Error occurred during initialization of VM Unable to load native library: /u01/libjava.so: cannot open shared object file: No such file or directory . Could you please help out. Regards,... (2 Replies)
Discussion started by: Kamal1108
2 Replies
PTHREAD_CONDATTR_DESTROY(3P)				     POSIX Programmer's Manual				      PTHREAD_CONDATTR_DESTROY(3P)

PROLOG
This manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (consult the correspond- ing Linux manual page for details of Linux behavior), or the interface may not be implemented on Linux. NAME
pthread_condattr_destroy, pthread_condattr_init - destroy and initialize the condition variable attributes object SYNOPSIS
#include <pthread.h> int pthread_condattr_destroy(pthread_condattr_t *attr); int pthread_condattr_init(pthread_condattr_t *attr); DESCRIPTION
The pthread_condattr_destroy() function shall destroy a condition variable attributes object; the object becomes, in effect, uninitialized. An implementation may cause pthread_condattr_destroy() to set the object referenced by attr to an invalid value. A destroyed attr attributes object can be reinitialized using pthread_condattr_init(); the results of otherwise referencing the object after it has been destroyed are undefined. The pthread_condattr_init() function shall initialize a condition variable attributes object attr with the default value for all of the attributes defined by the implementation. Results are undefined if pthread_condattr_init() is called specifying an already initialized attr attributes object. After a condition variable attributes object has been used to initialize one or more condition variables, any function affecting the attributes object (including destruction) shall not affect any previously initialized condition variables. This volume of IEEE Std 1003.1-2001 requires two attributes, the clock attribute and the process-shared attribute. Additional attributes, their default values, and the names of the associated functions to get and set those attribute values are implemen- tation-defined. RETURN VALUE
If successful, the pthread_condattr_destroy() and pthread_condattr_init() functions shall return zero; otherwise, an error number shall be returned to indicate the error. ERRORS
The pthread_condattr_destroy() function may fail if: EINVAL The value specified by attr is invalid. The pthread_condattr_init() function shall fail if: ENOMEM Insufficient memory exists to initialize the condition variable attributes object. These functions shall not return an error code of [EINTR]. The following sections are informative. EXAMPLES
None. APPLICATION USAGE
None. RATIONALE
See pthread_attr_init() and pthread_mutex_init(). A process-shared attribute has been defined for condition variables for the same reason it has been defined for mutexes. FUTURE DIRECTIONS
None. SEE ALSO
pthread_attr_destroy(), pthread_cond_destroy(), pthread_condattr_getpshared(), pthread_create(), pthread_mutex_destroy(), the Base Defini- tions volume of IEEE Std 1003.1-2001, <pthread.h> COPYRIGHT
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1, 2003 Edition, Standard for Information Technol- ogy -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html . IEEE
/The Open Group 2003 PTHREAD_CONDATTR_DESTROY(3P)
All times are GMT -4. The time now is 11:01 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy