4 ms·
Shell scripts are a terrible language for any kind of event handling. Consider that: - You're probably going to be starting a new process for handling each eve
by ambrop7 13y ago
Shell scripts are a terrible language for any kind of event handling. Consider that:
- You're probably going to be starting a new process for handling each event.
- You'll be using the filesystem to store state between events.
- You'll be using helper programs to access various kernel resources.
- To keep such resources around, you'll have to keep the helpers running during events.
Compared to implementing whatever you're doing in a single process with an event-driven design, or in multiple processes with their responsibilities split well, the shell script approach will be orders of magnitude slower and less reliable (the latter due to lots of race conditions).