Answer the question
In order to leave comments, you need to log in
What is the difference between a file descriptor and a file descriptor?
I do not understand what and how. Is there a working code where it can be felt and touched?
Sometimes it is not clear what is copied to the child process from the parent
Answer the question
In order to leave comments, you need to log in
There is no difference. That's right - a file descriptor.
It's just a number - the ID of a particular I/O thread.
In Unix, under descriptors 0, 1, 2 for each process, STDIN, STDOUT, STDERR are usually immediately opened by default.
This is a process at the end of which a result is returned.
For example, the code is executed and exit 0
comes at the end
. The answer is that everything went well.
In short, it is a return from a function or value code about the status of the operation.
Often used in permissions handling events.
For example, if you request access to a file and the system response is 0, then everything is fine with access. If 1 is not available. The existence of the file is also checked. This is conditional. In the program, you can implement this in any way. How much fantasy is enough.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question