I deleted the executable, so why is it still running?
root@raspberrypi:/test# ls -la total 11096 drwxrwxrwx 2 pi pi 4096 Mar 12 18:26 . drwxrwxr-x 11 pi pi 4096 Feb 28 13:50 .. -rwxrw-rw- 1 pi pi 12149 Feb 28 13:00 .cproject -rwxrw-rw- 1 pi pi 3183 Mar 12 18:26 main.cpp -rwxrw-rw- 1 pi pi 2169 Feb 28 14:28 main.cpp~ -rwxrw-rw- 1 pi pi 1862 Feb 28 13:20 original.cpp -rwxrw-rw- 1 pi pi 984 Feb 28 13:09 .project -rwxrw-rw- 1 pi pi 11323309 Jan 28 12:54 teatro.png root@raspberrypi:/test# ./testedfb running...
Some time later (after I tried to compile again, but there's an error, and the executable was not created) the behavior changed to:
root@raspberrypi:/test# ./testedfb bash: ./testedfb: No such file or directory
But I'm still curious; why was it was running?
Just happened again, and I did the test:
root@raspberrypi:/test# killall -9 testedfb testedfb: no process found root@raspberrypi:/test# ./testedfb running...
And it still runs...
I'm on a Raspberry Pi's Bash.
It just happened the oposite now, the file was there, but it was not found:
root@raspberrypi:/test# ./testedfb bash: ./testedfb: No such file or directory root@raspberrypi:/test# ls main.cpp main.cpp~ original.cpp teatro.png testedfb
(and on the next attempt it did run)
Maybe it's the NFS (this folder is mounted) that is too slow to update? (thanks @derobert for asking about the filesystem) - this would answer this second case, not the first one, as I cannot see the executable, but still I can execute it... (and looks like the process is not running too)