I study programming under Linux, in particular system calls :)
Hours-long search for a normal reference for system calls ended, in fact, with three links:
- http://linuxdoc.ru/sys-doc.html
- http://www.digilife.be/quickreferences/qrc/linux%20system%20call%20quick%20reference.pdf
- http://syscalls.kernelgrok.com/
Everything else is about the same, only with a different design. Well, or some textbook about Unix in general (albeit in Russian).
So, in practice, you will have to use all 3 directories ...
- In the first one, find the necessary function and read its description (not bad, that everything is in Russian).
- In the second, find the function number by name.
- The third is to use when there is not enough information from the 1st (there is more detailed information and the number of functions is much more ... and even there are source codes).
Who has, throw, pliz, a reference to a convenient, complete, structured directory, which will indicate ( important! ) The function numbers and the values of the constants (such as EBADF , etc., because it is necessary for the assembler). That the standard input descriptor = 0, and the output = 1 I already understood, but it seems to me, there are still a lot of similar pieces there, which again I’ll have to look for in example on the Internet, which is not very convenient ... more examples of use will be, it will be generally super (although not critical).
In particular, I have such a question : brk and sbrk are different functions. And the function number ( eax ) seems to be the same ... How can this be? What's the catch? Or does the system determine the value of the transmitted parameter (of the type> 0x8000000, which means brk , otherwise sbrk )?
<errno.h>. If you want to find out the real value of the constant, you can look at one of the files listed below. The macro RLIMIT_FSIZE should be defined somewhere inside<unistd.h>- mymediagit greptoo soon. - 0andriy