Revision: 2793 Author: piumarta Date: 2013-10-20 08:16:00 -0700 (Sun, 20 Oct 2013) Log Message: ----------- add ioExitWithErrorCode()
Modified Paths: -------------- trunk/platforms/Mac OS/vm/sqMacMain.c trunk/platforms/unix/ChangeLog trunk/platforms/unix/vm/sqUnixMain.c trunk/platforms/win32/vm/sqWin32Window.c
Modified: trunk/platforms/Mac OS/vm/sqMacMain.c =================================================================== --- trunk/platforms/Mac OS/vm/sqMacMain.c 2013-10-20 15:06:47 UTC (rev 2792) +++ trunk/platforms/Mac OS/vm/sqMacMain.c 2013-10-20 15:16:00 UTC (rev 2793) @@ -87,6 +87,8 @@ 3.8.21b1 Jan 14th, 2009 JMM fix issue with mmap allocation, only allow explicitly to avoid mmap problems on nfs 4.0.1b1 Apr 9th, 2009 JMM add logic for etoys on a stick 4.2.1b1 Aug 19th, 2009 JMM add gSqueakResourceDirectoryName + + ------- Oct 19th, 2013 dtl add ioExitWithErrorCode(int ec) */
@@ -326,7 +328,13 @@ return 0; }
-int ioExit(void) { +sqInt ioExit(void) +{ + return ioExitWithErrorCode(0); +} + +sqInt ioExitWithErrorCode(int ec) +{ UnloadScrap(); ioShutdownAllModules(); if (!gSqueakHeadless || gSqueakBrowserWasHeadlessButMadeFullScreen) @@ -741,4 +749,4 @@ int clearProfile(void){return 0;} int dumpProfile(void){return 0;} int startProfiling(void){return 0;} -int stopProfiling(void) {return 0;} \ No newline at end of file +int stopProfiling(void) {return 0;}
Modified: trunk/platforms/unix/ChangeLog =================================================================== --- trunk/platforms/unix/ChangeLog 2013-10-20 15:06:47 UTC (rev 2792) +++ trunk/platforms/unix/ChangeLog 2013-10-20 15:16:00 UTC (rev 2793) @@ -1,5 +1,7 @@ 2013-10-20 Ian Piumarta <com -dot- gmail -at- piumarta (backwards)>
+ * vm/sqUnixMain.c (ioExitWithErrorCode): Added. + * plugins/SqueakSSL/sqUnixOpenSSL.c: Fix memory leaks (thanks to Levente Uzonyl).
Modified: trunk/platforms/unix/vm/sqUnixMain.c =================================================================== --- trunk/platforms/unix/vm/sqUnixMain.c 2013-10-20 15:06:47 UTC (rev 2792) +++ trunk/platforms/unix/vm/sqUnixMain.c 2013-10-20 15:16:00 UTC (rev 2793) @@ -1464,8 +1464,14 @@
sqInt ioExit(void) { + return ioExitWithErrorCode(0); +} + +sqInt ioExitWithErrorCode(int ec) +{ dpy->winExit(); - exit(0); + exit(ec); + return ec; }
#if defined(DARWIN)
Modified: trunk/platforms/win32/vm/sqWin32Window.c =================================================================== --- trunk/platforms/win32/vm/sqWin32Window.c 2013-10-20 15:06:47 UTC (rev 2792) +++ trunk/platforms/win32/vm/sqWin32Window.c 2013-10-20 15:16:00 UTC (rev 2793) @@ -1400,10 +1400,15 @@
int ioExit(void) { + return ioExitWithErrorCode(0); +} + +sqInt ioExitWithErrorCode(int ec) +{ inCleanExit = 1; - exit(0); + exit(ec); /* avoid the warnings here */ - return 0; + return ec; }
int ioBeep(void)