What are the advantages of fork on unix systems?
Asked by abdullah farhatWhat is the difference from a simple start **** & gt; / dev / null & amp;?
Answers
joann bubonic paulek
Nothing. This is simply an outdated concept that persists for compatibility. Single Unix Specification says the following:
duyenngoc auth
I could be wrong, but in my opinion the & quot; **** & gt; / dev / null && quot; will receive a SIGHUP if the terminal is broken
Replies:
is absolutely true! - stephanie wilga
only not HUP but bonal TERM (here I can be wrong) - amaya
kathy doyle
Transfer status, such as.
Replies:
In the sense that when a fork is generated, a copy of the process, already initialized, for example, is generated. In the case of a “simple start **** & gt; / dev / null &? ”will have to initialize each time anew (not to mention transferring data for it).
If you just need to start your own process from scratch, there are no advantages, plus fork is very slow. - eva truesdale
If you just need to start your own process from scratch, there are no advantages, plus fork is very slow. - eva truesdale
Is it possible to learn more about initialization, I’m interested in the difference in system resources, which method will work faster and eat less memory?
I want to understand the future, it is not clear why the question deserved a minus? This is not the subject of Habr? - sharad sundararajan
I want to understand the future, it is not clear why the question deserved a minus? This is not the subject of Habr? - sharad sundararajan
for which I have a minus, I also do not quite understand =)
you are described below ideology, I am more on the practical part:
if you want to execute some command separately from the main process and work yourself further, the “easy start” will be faster and will not eat up extra memory at the start of the command.
if you want to pick up a copy of the main process, then the fork will be more convenient because everything will be initialized in the child processes. here, the initialization is not in the understanding of the OS, but from the point of view of the process itself (an abstract example: reading configs, creating a kernel, defining what and why we are doing - this will all be done with fork in child processes). - majella
you are described below ideology, I am more on the practical part:
if you want to execute some command separately from the main process and work yourself further, the “easy start” will be faster and will not eat up extra memory at the start of the command.
if you want to pick up a copy of the main process, then the fork will be more convenient because everything will be initialized in the child processes. here, the initialization is not in the understanding of the OS, but from the point of view of the process itself (an abstract example: reading configs, creating a kernel, defining what and why we are doing - this will all be done with fork in child processes). - majella
camron
very ideologically clear idea of a split process
Light CMS: who used, what reviews? ::
Advise the gallery on jQuery with the ability to comment on images ::
Replacing & quot; captcha & quot ;? ::
Tell me a normal traffic accounting system for Linux ::
Where to find a translator bilingual RU EN to translate the blog engine's interface.?
Leave Repply for What are the advantages of fork on unix systems?