Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Is it actually important for a programmer to know if the standard library function he/she is using is actually executing a system call? If so, why?

Intuitively I'm guessing the only importance is in knowing if the general standard function is a library function or a system call itself. In other cases, I'm guessing there isn't much of a need to know if a library functions uses internally a system call?

share|improve this question

closed as off topic by Gilles, Renan, slm, jasonwryan, peterph Apr 29 '13 at 13:25

Questions on Unix & Linux Stack Exchange are expected to relate to Unix or Linux within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

2 Answers 2

As a programmer you should be interested in what the function call does, not how it is done. Sure, one can be curious about such things. But if a particular function does (or could) invoke a system call or not is very much system-dependent.

share|improve this answer
1  
Some "system-calls" may actually not be system calls per se: VDSO –  peterph Apr 29 '13 at 13:25

I can only think of two situations in which you might need to care about what the library function is doing:

  1. You discovered a bug in the function, and you verified this via some test cases.

  2. The function is causing you performance problems, and you verified this via appropriate profiling.

As a general rule, though, it doesn't really matter what the library is doing, so long as it isn't causing you any trouble.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.