+/*
+ * CDE - Common Desktop Environment
+ *
+ * Copyright (c) 1993-2012, The Open Group. All rights reserved.
+ *
+ * These libraries and programs are free software; you can
+ * redistribute them and/or modify them under the terms of the GNU
+ * Lesser General Public License as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * These libraries and programs are distributed in the hope that
+ * they will be useful, but WITHOUT ANY WARRANTY; without even the
+ * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with these librararies and programs; if not, write
+ * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
+ * Floor, Boston, MA 02110-1301 USA
+ */
/* $TOG: SmUI.c /main/32 1998/07/23 18:08:17 mgreess $ */
/* *
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
*/
#if !defined(SVR4) && !defined(sco)
old = sigblock(sigmask(SIGTERM));
+ sigblock(sigmask(SIGHUP));
+ sigblock(sigmask(SIGPIPE));
#else
old = sighold(SIGTERM);
#endif
smGD.loggingOut = True;
+ /* JET - set this here so we don't exit prematurely (while
+ * handling our own SM exit callback - duh).
+ */
+ smGD.ExitComplete = False;
+
saveTimeout = False;
timerId = XtAppAddTimeOut (smGD.appCon, smRes.saveYourselfTimeout,
SaveTimeout, NULL);
XtDispatchEvent(&next);
}
}
+
+ /* JET - need this, since dtsession was exiting in the
+ * XtAppNextEvent above (receiving it's own EXIT SM message) This
+ * is checked in SmExit() so exit's will only occur after this
+ * housekeeping has been completed.
+ */
+ smGD.ExitComplete = True;
if (smXSMP.saveState.shutdownCanceled == False) {
/*
Dimension width, height;
Position x, y;
XEvent next;
+ int len;
pch1 = strdup ((char *) GETMESSAGE(40, 1,
"A session cannot be started because of the\nfollowing error:"));
error_file = XtMalloc(MAXPATHLEN+1);
strcpy (error_file, "");
- if (check_errorlog) {
- char *home;
- if (home = getenv ("HOME"))
- sprintf (error_file, "%s/%s/%s", home, DtPERSONAL_CONFIG_DIRECTORY,
- DtERRORLOG_FILE);
- }
+ /* JET - VU#497553 */
+ if (check_errorlog)
+ {
+ char *home;
+
+ if (home = getenv ("HOME"))
+ {
+ len = strlen(home) +
+ strlen(DtPERSONAL_CONFIG_DIRECTORY) +
+ strlen(DtERRORLOG_FILE);
+
+ if (len > MAXPATHLEN)
+ error_file = XtRealloc(error_file, len + 1);
+
+ sprintf (error_file, "%s/%s/%s", home,
+ DtPERSONAL_CONFIG_DIRECTORY,
+ DtERRORLOG_FILE);
+ }
+ }
pch5 = XtMalloc (strlen (pch1) + strlen (pch2) + strlen (pch3) + strlen (pch4) +
strlen (error_file) + 15);