about os.exit()

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

about os.exit()

Berkant Atay
Hi,
Can anybody please tell me why os.exit() does not cause a forced
shutdown of the plua program when used inside a function call or in a
loop, while it works perfectly in the main trunk of the program?
I am having difficulty quiting an application that has many gui
components and many function calls (I'm a old Pascal guy :). Instead of
a simple os.exit(), I have to use the break command, but then I'll have
to break all the loops and func calls backwards in order to get down to
the main program. Thank you in advance. And thank you Marcio for your
brilliant efforts. Nice to hear an upcoming 2.09b...
Regards,
Berkant.

Reply | Threaded
Open this post in threaded view
|

Re: about os.exit()

migueletto-2
Hi,

> Can anybody please tell me why os.exit() does not cause a forced
> shutdown of the plua program when used inside a function call or in a
> loop, while it works perfectly in the main trunk of the program?

Currently os.exit() just posts an appStop event to PalmOS. Therefore,
it will not cause the application to terminate immediately.

This behavior is likely to change in the next release, making
os.exit() act like its Unix/Windows counterparts.

Regards,
Marcio.