In the effort to bring some of the Linux advantages to my customers running Windows 10, I've developed a few bash scripts in order to automate some of their everyday tasks.
I use to let them run the scripts through a Windows batch with the following content:
Ubuntu1804 run /usr/local/bin/script.sh
Unfortunately some of the scripts are taking long, either for huge sql queries or slow net and I/O operations, and during this wait a few users just can't refrain from closing the "strange black window", thus killing the process.
The command above will be killed even if put in quotes with & at the end.
I tried the following and didn't get testOK
on my desktop.
Ubuntu1804 run "sleep 10 && touch /mnt/c/Users/myuser/Desktop/testOK &"
While this keeps the window open and creates the file testOK
instead.
Ubuntu1804 run "sleep 10 && touch /mnt/c/Users/myuser/Desktop/testOK"
I was wondering if there is a way to avoid the process in Ubuntu WSL to be killed as soon as the window is closed.
Prevent the window to appear at all would be great too.
Prevent the user to interact with it would be an acceptable workaround.
Clients are Windows 10 Professional with latest security and quality rollup, I'm not providing site details since this is happening at more than one customer, some of them are big MS AD domains, some other are small offices with just a workgroup.