From 0db3598235c9f93e7f87df4bdab0787118cae7cc Mon Sep 17 00:00:00 2001 From: Michael Jennings Date: Wed, 3 Jul 2002 17:55:48 +0000 Subject: [PATCH] Wed Jul 3 13:49:27 2002 Michael Jennings (mej) Fixed a bug in libscream that caused remote screen sessions to be resumed with, e.g., "-e ^Uu_" instead of "-e ^Uu". Applied a bug fix from Bill Allombert where I was using the wrong variable for loading the icon file from disk. Also fixed a problem where PrintScreen would cause Eterm to exit. Pointed out by Laurence J. Lane . SVN revision: 6336 --- ChangeLog | 12 ++++++++++++ src/command.c | 7 ++++--- src/libscream.c | 2 +- src/pixmap.c | 4 ++-- 4 files changed, 19 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 204ad15..7e3d4e2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4751,3 +4751,15 @@ Fri Jun 28 17:02:57 2002 Michael Jennings (mej) One too many.... ---------------------------------------------------------------------- +Wed Jul 3 13:49:27 2002 Michael Jennings (mej) + +Fixed a bug in libscream that caused remote screen sessions to be +resumed with, e.g., "-e ^Uu_" instead of "-e ^Uu". + +Applied a bug fix from Bill Allombert +where I was using the wrong variable for loading the icon file from +disk. + +Also fixed a problem where PrintScreen would cause Eterm to exit. +Pointed out by Laurence J. Lane . +---------------------------------------------------------------------- diff --git a/src/command.c b/src/command.c index 4a9a5db..fdd3967 100644 --- a/src/command.c +++ b/src/command.c @@ -1045,15 +1045,16 @@ handle_child_signal(int sig) /* If the child that exited is the command we spawned, or if the child exited before fork() returned in the parent, it must be our immediate child that exited. We exit gracefully. */ - if ((pid == cmd_pid && cmd_pid != -1) - || (pid == -1 && errno == ECHILD && cmd_pid != -1) - || (pid == 0)) { + if (((pid == cmd_pid) && (cmd_pid != -1)) + || ((pid == -1) && (errno == ECHILD) && (cmd_pid != -1)) + || ((pid == 0) && (cmd_pid != -1) && ((kill(cmd_pid, 0)) < 0))) { if (Options & Opt_pause) { paused = 1; return; } exit(EXIT_SUCCESS); } + errno = save_errno; D_CMD(("handle_child_signal: installing signal handler\n")); diff --git a/src/libscream.c b/src/libscream.c index 9a90623..c881871 100644 --- a/src/libscream.c +++ b/src/libscream.c @@ -1062,7 +1062,7 @@ ns_attach_ssh(_ns_sess ** sp) { _ns_sess *sess; char cmd[NS_MAXCMD + 1]; - char esc[] = " -e^___"; + char esc[] = " -e^\0\0\0"; char *call, *p; int ret; diff --git a/src/pixmap.c b/src/pixmap.c index c3f0109..68bff21 100644 --- a/src/pixmap.c +++ b/src/pixmap.c @@ -2151,9 +2151,9 @@ set_icon_pixmap(char *filename, XWMHints * pwm_hints) XIconSize *icon_sizes; int count, i; - temp_im = imlib_load_image_with_error_return(filename, &im_err); + temp_im = imlib_load_image_with_error_return(icon_path, &im_err); if (temp_im == NULL) { - print_error("Unable to load icon file \"%s\" -- %s\n", filename, imlib_strerror(im_err)); + print_error("Unable to load icon file \"%s\" -- %s\n", icon_path, imlib_strerror(im_err)); } else { /* If we're going to render the image anyway, might as well be nice and give it to the WM in a size it likes. */ if (XGetIconSizes(Xdisplay, Xroot, &icon_sizes, &count)) {