I use python multi threading to execulate a shell script, but for some reason, this shell script can't execulate by multi thread, I want make this script avoid multi thread for foolproof, Is any way can do?
thanks!
I use python multi threading to execulate a shell script, but for some reason, this shell script can't execulate by multi thread, I want make this script avoid multi thread for foolproof, Is any way can do?
thanks!
Use a mutex. Say, create in the script check if a file is created (e.g. in /temp). If file exists, exit. If not, create it and do useful actions. In the end delete the file.