OT: many script or many fork?
Seb
sbb at tuxfamily.org
Wed Jul 25 09:08:07 UTC 2007
Le Wed, 25 Jul 2007 09:46:21 +0200
"Roberto A. Foglietta" <roberto.foglietta at gmail.com> a écrit:
> Hi to all folks,
Hello,
> sorry for the OT but I am wondering if it would be better have three
> indipendent script which runs concurrently or it is better having only
> a script like this:
Theorically 3 scripts = 3 shells = 3 system calls. So, IMHO the most
efficient must be to launch one script. After, it depends on the code
you execute : if there are many system calls and few needs in memory,
you probably won't see the difference.
> while true; do
> [ ... code 1 ... ]
> done &
>
> while true; do
> [ ... code 2 ... ]
> done &
>
> while true; do
> [ ... code 3 ... ]
> done
Maybe it would be good to end it with a 'wait' in order to be sure you
don't let an infinite loop in background.
++
Seb.
More information about the busybox
mailing list