|P is for Practical|
Re: Im I forking properly ?by flexvault (Monsignor)
|on Apr 14, 2016 at 21:26 UTC||Need Help??|
Since this works for you, everything may be Great!
However since this process is long-running, it might be better to pre-fork some number (maybe 8) of waiting children. Currently, you 'fork' for each message, and 'fork' uses a lot of computer power just to start.
If you 'Super Search' on 'pre-fork' you should find examples.
Use 'kill -0 $pid' to see if the child is *working*, and the parent can 'fork' another child is not.
"Well done is better than well said." - Benjamin Franklin