Thanks for ur reply.
got it. looking in wrong path.  from where i can get docs on sysdeps dir
structure and some detail on its functions

One more problem. i m looking for File System functions like __unlink ,
__open etc.
they r defined in 2 places in the tree under sysdeps/mach/hurd/unlink.c
or in /sysdeps/generic/unlink.c
generic/unlink.c is same as generic/system.c.
sysdeps/mach/hurd/unlink.c looks like the main unlink code. but its using
some functions which i m unable to find.
like __dir_unlink.




Andreas Jaeger wrote:

> >>>>> Junaid Iqbal writes:
>
>  > hi all.
>  > I m unable to undersatnd how system calls implemented in glibc (ver
>  > 2.1.3).
>  > for example __libc_system  function (defined in system.c) have these
>  > lines
> That's the fall back in sysdeps/generic/system.c, the function used on
> Linux is in sysdeps/posix/system.c.  Read the documentation about the
> sysdeps directory and have also a look at syscalls.list.
>
>  > #include <errno.h>
>  > #include <stdlib.h>
>
>  > /* Execute LINE as a shell command.  */
>  > int
>  > __libc_system (line)
>  >      const char *line;
>  > {
>  >   if (line == NULL)
>  >     return 0;   /* This indicates no command processor.  */
>
>  >   __sys_errno (ENOSYS);
>  >   return -1;
>  > }
>  > weak_alias (__libc_system, system)
>
>  > stub_warning (system)
>  > #include <stub-tag.h>
>
>  > can some one give me hand in understanding this?
>  > thanks in advance.
>
> --
>  Andreas Jaeger
>   SuSE Labs [EMAIL PROTECTED]
>    private [EMAIL PROTECTED]

Reply via email to