detect parent shell