Sponsored Content
Top Forums Programming sco unix 5.0.5 call sytem() function question!please help me! Post 21648 by jyotipg on Tuesday 21st of May 2002 01:36:11 AM
Old 05-21-2002
well, it makes sense to see the value of of both "ret" and "errno". But how did u get this magic number of 8 ??


"ret >>=8"

Its better to check that the value of ret is 0. Even values greater than zero denote an error.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

UNIX Sytem 5, release 3

Will UNIX Sytem 5, release 3 run on a Pentium (clock speed 100-200 MHz)? thanks (5 Replies)
Discussion started by: samklyle
5 Replies

2. Shell Programming and Scripting

function call

hi, can any one help me to correct this function call. awk -F "," '{ {first=$1; sec=$2; tro=$3;quat=$4 } if (tro == "") { $3 = search "$file2" "$first" "$file3" {print $1","$2","$3","$4} } else {print $1","$2","$3 $4}}' $file1 > $file search () { (2 Replies)
Discussion started by: kamel.seg
2 Replies

3. UNIX for Dummies Questions & Answers

Question about install JDK on SCO Unix

I try to run java file on SCO Unix, but my Unix doesn't setup with JDK environment. I go to sun.com to download JDK for SCO Unix, but there is only JDK for HP-UNIX, is it ok for SCO Unix? If it's ok, how can I install it to my Unix after I download? If it's not ok, How can I do to run java file in... (0 Replies)
Discussion started by: wendyz
0 Replies

4. Shell Programming and Scripting

Function Call

Hi, I have a string corresponding to a function. How I can call that function without if statement? Thanks in advance. (4 Replies)
Discussion started by: Zaxon
4 Replies

5. Infrastructure Monitoring

diffrence between method call and function call in perl

Hello, I have a problem with package and name space. require "/Mehran/DSGateEngineLib/general.pl"; use strict; sub System_Status_Main_Service_Status_Intrusion_Prevention { my %idpstatus; my @result; &General_ReadHash("/var/dsg/idp/settings",\%idpstatus); #print... (4 Replies)
Discussion started by: Zaxon
4 Replies

6. Shell Programming and Scripting

Function call

Hi foiks i am unable to find what is wrong in my code mu functionality is to exit from shell when i give 99 but it is not calling function ext Could you please correct me. read option if ; then ext else echo "out" fi function ext { echo "tested 99 and exit... (12 Replies)
Discussion started by: kojo
12 Replies

7. Shell Programming and Scripting

Call a pl sql function from unix

hi, I want to know how to call a pl sql function testfunction(param1,..) that returns a value and grab that value in a shell variable. Thnx in advance ---------- Post updated 03-30-10 at 11:58 AM ---------- Previous update was 03-29-10 at 03:49 PM ---------- thnx a lot jim (0 Replies)
Discussion started by: austinhell3_16
0 Replies

8. Shell Programming and Scripting

After exit from function it should not call other function

Below is my script that is function properly per my conditions but I am facing one problem here that is when one function fails then Iy should not check other functions but it calls the other function too So anyone can help me how could i achieve this? iNOUT i AM GIVING TO THE... (1 Reply)
Discussion started by: rohit22hamirpur
1 Replies

9. Shell Programming and Scripting

To determine the File Sytem Usage on Multiple UNIX server

Hello All :) I want to write a shell script to find the file system usage on multiple UNIX servers. Commands: df -g fsJCAPS Below script works fine and it displays results on terminal/console. I want to store /redirect output on to local server from where I'm running the script. ... (3 Replies)
Discussion started by: Mohammad Nawaz
3 Replies

10. Programming

Writing a UNIX shell script to call a C function and redirecting data to a .txt file

Hi, I am complete new to C programming and shell scripting. I just wrote a simple C code to calculate integral using trapezoid rule. I am prompting user to pass me No. of equally spaced points , N , upper and lower limit. My code looks as follows so far: #include<stdio.h> #include<string.h>... (2 Replies)
Discussion started by: bjhjh
2 Replies
PAPI_strerror(3)						       PAPI							  PAPI_strerror(3)

NAME
PAPI_strerror - Returns a string describing the PAPI error code. SYNOPSIS
Detailed Description C Interface: #include <papi.h> char * PAPI_strerror( int errorCode ); Parameters: code -- the error code to interpret Return values: *error -- a pointer to the error string. NULL -- the input error code to PAPI_strerror() is invalid. PAPI_strerror() returns a pointer to the error message corresponding to the error code code. If the call fails the function returns the NULL pointer. This function is not implemented in Fortran. Example: * int ret; * int EventSet = PAPI_NULL; * int native = 0x0; * char error_str[PAPI_MAX_STR_LEN]; * * ret = PAPI_create_eventset(&EventSet); * if (ret != PAPI_OK) * { * fprintf(stderr, "PAPI error %d: %s0, ret, PAPI_strerror(retval)); * exit(1); * } * // Add Total Instructions Executed to our EventSet * ret = PAPI_add_event(EventSet, PAPI_TOT_INS); * if (ret != PAPI_OK) * { * PAPI_perror( "PAPI_add_event"); * fprintf(stderr,"PAPI_error %d: %s0, ret, error_str); * exit(1); * } * // Start counting * ret = PAPI_start(EventSet); * if (ret != PAPI_OK) handle_error(ret); * See Also: PAPI_perror PAPI_set_opt PAPI_get_opt PAPI_shutdown PAPI_set_debug Author Generated automatically by Doxygen for PAPI from the source code. Version 5.2.0.0 Tue Jun 17 2014 PAPI_strerror(3)
All times are GMT -4. The time now is 04:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy