The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to call the c library created by shc alfredo High Level Programming 1 03-31-2008 12:26 PM
How to call the c library created by shc alfredo Shell Programming and Scripting 0 03-31-2008 12:20 PM
c system call rangaswamy High Level Programming 1 02-19-2008 01:53 PM
tcsh user failed to call library in ksh program nir_s Shell Programming and Scripting 1 04-04-2006 08:29 AM
exec() system call a25khan High Level Programming 2 02-03-2004 12:06 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 07-19-2007
muru muru is offline
Registered User
  
 

Join Date: Jun 2006
Posts: 15
how to differentiate system call from library call

Hi,
Ho do I differentiate system call from library call?
for example if I am using chmod , how do I find out if it is a system call or library call?

Thanks
Muru
  #2 (permalink)  
Old 07-19-2007
blowtorch's Avatar
blowtorch blowtorch is offline Forum Advisor  
Supporter
  
 

Join Date: Dec 2004
Location: Singapore
Posts: 2,350
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.
  #3 (permalink)  
Old 07-19-2007
porter porter is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2007
Posts: 2,965
Quote:
Originally Posted by muru View Post
How do I differentiate system call from library call?
Look in "/usr/include/sys/syscall.h" or equivalent for a macro identifying an index for that call

Quote:
Originally Posted by muru View Post
for example if I am using chmod , how do I find out if it is a system call or library call?
You may not be able to as you link with libc.a (or similar) and that provides the calls, these may be a full implementation or a wrapper around the actual system call.
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 06:36 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0