CompuServe Thread

Forum unknown · Programming

#Manx & Work Bench

7 messages in this thread
#28882From: Drew LucyAug 4, 1986 9:21 PM
Could you take a minute and explain the requirements for returning to the Work Bench without crashing the system? My program seems to get its arguments ok but on exit the machine dies in one of a number of different ways. I'm using: Forbid(); ReplyMsg(WBMsg->sm_message.mn_ReplyPort); exit(0); WBMsg is the pointer Aztec passed me in argv. What am I missing? Sorry to keep bringing this up but, it is really bugging me. – Drew –
#28937From: wayne hamiltonAug 5, 1986 1:23 AM
Drew, i think your problem is that you're ReplyMsg()ing the MsgPort, when you should be doing it to the message itself. try: "ReplyMsg(WBMsg)". wayne
#29061From: Charlie HeathAug 6, 1986 6:18 PM
But why do you need to reply at all? Doesn't the Manx startup code automaticly handle the WBench startup and exit stuff?
#29061From: Charlie HeathAug 6, 1986 6:18 PM
But why do you need to reply at all? Doesn't the Manx startup code automaticly handle the WBench startup and exit stuff?
#28937From: wayne hamiltonAug 5, 1986 1:23 AM
Drew, i think your problem is that you're ReplyMsg()ing the MsgPort, when you should be doing it to the message itself. try: "ReplyMsg(WBMsg)". wayne
#28960From: Aegis DevelopmentAug 5, 1986 5:05 PM
I guess you will have to do a permit before exit. I don't use Forbid() except in CloseWindowSafely() which is a public domain function to close windows in a multiple window/single message port enviroment. I don't do anything upon exit except close all my windows, close the screen, free the message port, free my allocated memory and drop out of main()… In fact Draw has only one exit() point …. and that's in main.
#28960From: Aegis DevelopmentAug 5, 1986 5:05 PM
I guess you will have to do a permit before exit. I don't use Forbid() except in CloseWindowSafely() which is a public domain function to close windows in a multiple window/single message port enviroment. I don't do anything upon exit except close all my windows, close the screen, free the message port, free my allocated memory and drop out of main()… In fact Draw has only one exit() point …. and that's in main.