As stated in wikipedia here : "Files opened when spawn is called remain open in the child process." (pretty similar to exec () )
OK, the OS has saved some files open and ready for our newborn uninformed process. Suppose our process does not know about previously opened files and finally decides to end; while programming languages ββsuch as C require some internal cleaning process to complete.
My question is: Does this cleaning method affect these open files in any way? AFAIK they are not registered anywhere or something inside the process itself.
The answer must somehow determine the behavior of the programmer at the end of the spawn () ed process (or even exec () ed one). Can a complete cleaning procedure harm the parent in any way? (for example, by deleting temporary files) and therefore should not use the _exit () programmer exit () ?
source share