![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to call the c library created by shc | alfredo | High Level Programming | 1 | 03-31-2008 09:26 AM |
| How to call the c library created by shc | alfredo | Shell Programming and Scripting | 0 | 03-31-2008 09:20 AM |
| c system call | rangaswamy | High Level Programming | 1 | 02-19-2008 10:53 AM |
| tcsh user failed to call library in ksh program | nir_s | Shell Programming and Scripting | 1 | 04-04-2006 05:29 AM |
| exec() system call | a25khan | High Level Programming | 2 | 02-02-2004 09:06 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
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
|
|||
|
|||
|
Look in "/usr/include/sys/syscall.h" or equivalent for a macro identifying an index for that 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. |
|||
| Google The UNIX and Linux Forums |