how do I know what system calls are invoked by a specific library call
In Linux, a library call is a "normal" function call, while a system call goes through the kernel.
Library functions do not go to kernel mode for the call instruction, but often do so within the actual library function. In fact, a single library function may make zero, one, or several system calls and do context switches to kernel mode.
My question is how do I know what system calls are invoked by a specific library to fulfill the library function?
For example, fgets() is a shared library function. What system calls are invoked by fgets() to really do its job? What is the implementation detail for the library?
Your response will be appreciated.