comparison gtk/dw.c @ 1861:c836603d3f14

Add dw_shutdown() function which does the same thing as dw_exit() ... except it doesn't actually end the process. Useful for bindings that are expecting to do their own cleanup after the script exits.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Fri, 01 Mar 2013 16:51:08 +0000
parents 4790589f52a9
children f3ae396b3585
comparison
equal deleted inserted replaced
1860:02a23143334c 1861:c836603d3f14
10155 return (DWTID)pthread_self(); 10155 return (DWTID)pthread_self();
10156 } 10156 }
10157 10157
10158 /* 10158 /*
10159 * Cleanly terminates a DW session, should be signal handler safe. 10159 * Cleanly terminates a DW session, should be signal handler safe.
10160 */
10161 void dw_shutdown(void)
10162 {
10163 if ( dbgfp != NULL )
10164 {
10165 fclose( dbgfp );
10166 dbgfp = NULL;
10167 }
10168 }
10169
10170 /*
10171 * Cleanly terminates a DW session, should be signal handler safe.
10160 * Parameters: 10172 * Parameters:
10161 * exitcode: Exit code reported to the operating system. 10173 * exitcode: Exit code reported to the operating system.
10162 */ 10174 */
10163 void dw_exit(int exitcode) 10175 void dw_exit(int exitcode)
10164 { 10176 {
10165 if ( dbgfp != NULL ) 10177 dw_shutdown();
10166 {
10167 fclose( dbgfp );
10168 }
10169 exit(exitcode); 10178 exit(exitcode);
10170 } 10179 }
10171 10180
10172 #define DW_EXPAND (GTK_EXPAND | GTK_SHRINK | GTK_FILL) 10181 #define DW_EXPAND (GTK_EXPAND | GTK_SHRINK | GTK_FILL)
10173 10182