开发者

Examples or Exercises on UNIX system calls?

开发者 https://www.devze.com 2023-03-27 00:12 出处:网络
i am taking a course on UNIX system calls(file,process,I/O) etc. I would like to work on problems/exercises based on this so that i can familiarize myself on these topics.

i am taking a course on UNIX system calls(file,process,I/O) etc. I would like to work on problems/exercises based on this so that i can familiarize myself on these topics.

Could anyone direct me to a link regarding the same? I tried googling for it, but couldn't find the one i was looking for. If you know any useful 开发者_运维问答links, please let me know.

Thanks Kelly


System Call is a request for the operating system to do something on behalf of the user's program. The system calls are functions used in the kernel itself. To the programmer, the system call appears as a normal C function call.

Basic Example from a website : http://www.di.uevora.pt/~lmr/syscalls.html

 int main()
 {
    int i;
    extern int errno, sys_nerr;

    for (i = 0; i < sys_nerr; ++i)
       {
       fprintf(stderr, "%3d",i);
       errno = i;
       perror(" ");
       }
    exit (0);
 }

Many other useful (system calls) examples available over there.

0

精彩评论

暂无评论...
验证码 换一张
取 消