I never call write() but I error check right there, check amount written, and loop if EINTR, EAGAIN if O_NONBLOCK, too, all part of the joys of raw I/O:
Hello
I am executing the following script
nawk 'NR == 1 || substr($0,63,5) ~ /H... / && \
_++ == 2 { fn && close(fn); fn = "part_" ++c; _ = 1 }
{ print > fn }' sample.dat
When i execute as it is it is executing fine. but when i execute the whole script as a single line like below
... (2 Replies)
Hi ,
I m getting an error after executing the script.
My script.
Script is used to find out the date on 8 different machines(mentioned in SERVERNAMES file).
I have added public key to avoid ssh password and ssh without password working fine.
#!/bin/sh
fn_VMFind()
{
Date=`ssh -t... (5 Replies)
Hi friends
NO errors, but when I try to execute the program it gets struck.
Can any one find it out.
#include<stdio.h>
#include<sys/types.h>
#include<sys/mman.h>
#include<stdlib.h>
#include<fcntl.h>
#include<sys/stat.h>
#include<unistd.h>
#include<signal.h>
#include<string.h>
... (0 Replies)
Hi,
I have 2 files temp1.sh and temp2.sh as follows:
===========
temp1.sh
===========
echo "session1"
sh temp2.sh
echo "exit session2 and enter session1"
=================================
=============
temp2.sh
=============
echo "session2"
sh
echo "exit session2"... (5 Replies)
greetings,
i'll try to keep this simple...
i have a script that sets up my environment and creates a command line variable to execute. when i execute the variable i get an error telling me it cannot open one of the files on the command line. the error prints a file name that is definitely... (7 Replies)
I have the following script test.sh owned by dwdev account and group dwdev, the permissions on the script are as follows.
-rw-r-x--- 1 dwdev dwdev 279 Sep 17 13:19 test.sh
Groups:
cat /etc/group | grep dwdev
dwdev:x:704:dwdev
dwgroup:x:725:dwdev
writers:x:726:dwdev
User:
cat /etc/passwd |... (3 Replies)
Hello Friends,
I have written a code for the unisex bathroom which makes a policy that when a woman is in the bathroom only other women may enter, but not men, and vice versa. This program consists of four functions which a user defines but these functions are not properly working while... (4 Replies)
Hi,
I wrote this script to test if the output for DIR1 and DIR2 comes out as I want :
#!/bin/bash
DAY=$(date +%d)
MONTH=$(date +%b)
YEAR=$(date +%Y)
DIR1=$($MONTH$YEAR"_Blast_BC01")
DIR2=$($MONTH$YEAR"_Blast_BC15")
echo $DIR1
echo $DIR2
This is the output I want for echo $DIR1 ... (12 Replies)
Discussion started by: anaigini45
12 Replies
LEARN ABOUT CENTOS
papi_get_thr_specific
PAPI_get_thr_specific(3) PAPI PAPI_get_thr_specific(3)NAME
PAPI_get_thr_specific -
Retrieve a pointer to a thread specific data structure.
SYNOPSIS Detailed Description
@par Prototype:
int PAPI_get_thr_specific( int tag, void **ptr );
@param tag
An identifier, the value of which is either PAPI_USR1_TLS or
PAPI_USR2_TLS. This identifier indicates which of several data
structures associated with this thread is to be accessed.
@param ptr
A pointer to the memory containing the data structure.
@retval PAPI_OK
@retval PAPI_EINVAL
The @em tag argument is out of range.
In C, PAPI_get_thr_specific PAPI_get_thr_specific will retrieve the pointer from the array with index @em tag.
There are 2 user available locations and @em tag can be either
PAPI_USR1_TLS or PAPI_USR2_TLS.
The array mentioned above is managed by PAPI and allocated to each
thread which has called PAPI_thread_init.
There is no Fortran equivalent function.
@par Example:
int ret;
HighLevelInfo *state = NULL;
ret = PAPI_thread_init(pthread_self);
if (ret != PAPI_OK) handle_error(ret);
// Do we have the thread specific data setup yet?
ret = PAPI_get_thr_specific(PAPI_USR1_TLS, (void *) &state);
if (ret != PAPI_OK || state == NULL) {
state = (HighLevelInfo *) malloc(sizeof(HighLevelInfo));
if (state == NULL) return (PAPI_ESYS);
memset(state, 0, sizeof(HighLevelInfo));
state->EventSet = PAPI_NULL;
ret = PAPI_create_eventset(&state->EventSet);
if (ret != PAPI_OK) return (PAPI_ESYS);
ret = PAPI_set_thr_specific(PAPI_USR1_TLS, state);
if (ret != PAPI_OK) return (ret);
}
*
See Also:
PAPI_register_thread PAPI_thread_init PAPI_thread_id PAPI_set_thr_specific
Author
Generated automatically by Doxygen for PAPI from the source code.
Version 5.2.0.0 Tue Jun 17 2014 PAPI_get_thr_specific(3)