I would like to introduce multithreading feature in my shell script.
I have a script which calls the function read_cfg() with different arguments. Each of these function calls are independent.
Would it be possible to instantiate these function calls (not scripts) parallelly. Please let me how can we achieve that.. ?
fork(). These processes -- unlike threads -- have their own file descriptor tables, and their memory is copy-on-write (so when they change a variable's value, the parent process doesn't see it).&runs afork(), creating a whole new process, and not setting up any threads in either parent or child.