The OS can do both.
Normal mode: The OS waits for a specified amount of time for a process to shut down. If it does not, then it asks the user if they want to terminate the process.
Forced mode: The OS waits for a specified amount of time for a process to shut down. If it does not, it terminates it instantly.

Shutdown via the start-menu is normal mode, but APIs offer the forced mode, as well as the normal.