Is there a timeout when calling asterisk -x from shell

Hello guys,

I’m using asterisk 1.8.23 and I want to do the following:
I want to write a shell script which calls asterisk -x ‘core stop when convenient’ and reboots the machine after asterisk was stopped. However I noticed that when I call asterisk -x ‘core stop when convenient’ the focus is returned exactly one minute after the command is executed despite the asterisk is still running.
I guess that there is some kind of a timeout for the -x option but I can’t find any information.