What call prior to a fork?
A lengthy while ago I mosted likely to a work meeting with an extensively unusual firm in London that asserted to be experienced Unix professionals. Anyhow these individuals were full nutters and also not remarkably the firm does not appear to be there anymore, yet at the meeting they asked me the adhering to inquiry:
What is the first call you make to start a new process?
So I addressed that the first call is
fork. Both individuals interviewing me claimed (really insistently, as if I would certainly missed out on something entirely noticeable)
What call do you do in the past you do the fork?
Currently, I have no suggestion concerning this inquiry, and also I need to claim these individuals persuaded me they were straight-out boneheads for factors entirely unconnected to this inquiry, but also for some factor this inquiry still pests me already. Exists some call which is made prior to a fork? Exists some nuance I lost out on?
I wait to place this as a solution as one can just presume, yet:
- flush stdout in instance the youngster is mosting likely to do result before director.
close any kind of open documents descriptors more than 2 thinking that the new process is anticipating a "typical" setting as it would certainly obtain from the covering.
- some rare point called for by some rare version like Eunice that they however really brilliant of themselves to recognize.
Any kind of means you damage it, asking a rare valid inquiry is no other way to acquire anything concerning a prospect other than probably just how they reply to foolish inquiries.
My hunch is that
- either they were considering something that's just relevant to a details scenario that they really did not trouble to state, like purging barriers ;
- or they suggested something you would certainly do after forking ;
- or they suggested something you would certainly do prior to
execve(which is the various other fifty percent of generating an additional program), anticipating the solution
fork, yet they really did not actually recognize the entire point and also perplexed both.