I found this bug report : https://code.google.com/p/android/issues/detail?id=164385&q=gradle%20daemon&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars
In Android Studio on Linux, the gradle batch file doesn’t have the executable bit, so that Android Studio fails to stop it. After making the file as executable, gradle is fine closed with Android Studio.