For me it was a problem, because I thought it would quit the program. I wanted to do some thing like:
main() {
do something;
if(wrong){
quit(); }
rest of program....
}
But it works when you add sleep(-1); just after the quit().

If you use the quit() functiun, the program just post something to say it must quit, but it not end the program at this line, if you don't use a lot of resources in your file, you shouldn't have to wait a lot until Pcshell exits. else, it must delete every resource created in the \temp directory, and you will see your alert. If it's a problem for you, just stop the program with sleep();
or while(1){} just after quit().