Sponsored Content
Top Forums UNIX for Advanced & Expert Users how to differentiate system call from library call Post 302127855 by blowtorch on Thursday 19th of July 2007 10:22:24 PM
Old 07-19-2007
Check the man page. For chmod it will be something like chmod(2). Your OS will have specific sections of the man pages dedicated to things like system calls, user commands, admin commands, files and so on. The (2) usually means system call on most systems. Now check the man page for something else like fprintf. You will see either fprintf(3C) or fprintf(3). On most systems, section 3/3C is for library functions.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

tcsh user failed to call library in ksh program

Hi folks, I'm trying to organize functions in my ksh program into libraries. If I run my program as any ksh user it will succeed. Only when I run my program as tcsh user (i.e oracle) I failed. Example ======= The ksh code: tornado:/tmp # cat nir.ksh #! /bin/ksh cdromPath=`pwd`... (1 Reply)
Discussion started by: nir_s
1 Replies

2. Programming

c system call

How the c compiler differentiates the system calls and function calls? (1 Reply)
Discussion started by: rangaswamy
1 Replies

3. Shell Programming and Scripting

How to call the c library created by shc

I have written a shell script called square, which prints the square of the input number, eg. > square 4 16 There is a program called shc which compiles the shell scirpt and create a executable file and a c library file, namely square.x and square.x.c repectively. If I would like to... (0 Replies)
Discussion started by: alfredo
0 Replies

4. Programming

How to call the c library created by shc

I have written a shell script called square, which prints the square of the input number, eg. > square 4 16 There is a program called shc which compiles the shell scirpt and create a executable file and a c library file, namely square.x and square.x.c repectively. If I would like to... (1 Reply)
Discussion started by: alfredo
1 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

system call

Hi, How to write a system calls in a script ? > cd $HOME > ls -ltr thanks in advance.. (10 Replies)
Discussion started by: hegdeshashi
10 Replies

7. Programming

C:system call

Hi I'm studing the system call. I've written a small program that return the time spent in doing some operations. Now I'd like to write one that return the time spent in user mode of a process. I'm reading that i should use the tms struct: clock_t times(struct tms *buf); struct tms {... (2 Replies)
Discussion started by: Dedalus
2 Replies

8. Programming

system call

I have a cgi script which is called after certain time interval, which has this: system ("ls -l /tmp/cgic* | grep -v \"cgicsave.env\" | awk '{print $5}'"); During the execution of this script,the output is 0 sometimes. But due to this the system call is not working at all and doesnt o/p... (2 Replies)
Discussion started by: xs2punit
2 Replies

9. Programming

need help with system call

hi everyone i wrote a system call and compiled the kernel succesfully... my system call is in a file in the kernel folder named my_syscall1.c (kernel/my_syscall1.c) the header file for this system call i added it in the folder include like this include/my_syscall1/my_syscall1.h my problem is... (2 Replies)
Discussion started by: demis87
2 Replies

10. Shell Programming and Scripting

system call

Trying to figure out a load issue with a webserver. I have traced a php script and noticed the following connect(4, {sa_family=AF_INET, sin_port=htons(3306), sin_addr=inet_addr("XX.XX.XX.XX")}, 16) = -1 EINPROGRESS (Operation now in progress) <0.000035> poll(, 1, 2000) = 1 () <0.000120>... (5 Replies)
Discussion started by: rajan007
5 Replies
explain_fprintf_or_die(3)				     Library Functions Manual					 explain_fprintf_or_die(3)

NAME
explain_fprintf_or_die - formatted output conversion and report errors SYNOPSIS
#include <libexplain/fprintf.h> int explain_fprintf_or_die(FILE *fp, const char *format, ...); int explain_fprintf_on_error(FILE *fp, const char *format, ...); DESCRIPTION
The explain_fprintf_or_die function is used to call the fprintf(3) system call. On failure an explanation will be printed to stderr, obtained from the explain_fprintf(3) function, and then the process terminates by calling exit(EXIT_FAILURE). The explain_fprintf_on_error function is used to call the fprintf(3) system call. On failure an explanation will be printed to stderr, obtained from the explain_fprintf(3) function, but still returns to the caller. fp The fp, exactly as to be passed to the fprintf(3) system call. format The format, exactly as to be passed to the fprintf(3) system call. RETURN VALUE
The explain_fprintf_or_die function only returns on success, see fprintf(3) for more information. On failure, prints an explanation and exits, it does not return. The explain_fprintf_on_error function always returns the value return by the wrapped fprintf(3) system call. EXAMPLE
The explain_fprintf_or_die function is intended to be used in a fashion similar to the following example: int result = explain_fprintf_or_die(fp, format, ...); SEE ALSO
fprintf(3) formatted output conversion explain_fprintf(3) explain fprintf(3) errors exit(2) terminate the calling process COPYRIGHT
libexplain version 0.52 Copyright (C) 2010 Peter Miller explain_fprintf_or_die(3)
All times are GMT -4. The time now is 10:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy