Browse Source

Catch SIGINT and handle it, so that tasksel doesn't go into an infinite

loop.
tags/debian_version_1_0-8
Randolph Chung 21 years ago
parent
commit
8344e7833b
5 changed files with 15 additions and 10 deletions
  1. +3
    -2
      debian/changelog
  2. +0
    -1
      debian/files
  3. +3
    -2
      slangui.c
  4. +7
    -4
      tasksel.c
  5. +2
    -1
      tasksel.h

+ 3
- 2
debian/changelog View File

@@ -1,8 +1,9 @@
tasksel (1.0-8) unstable; urgency=low
tasksel (1.0-8) frozen unstable; urgency=low

* Changed the Quit button into a Finished button - karlheg.
* catch SIGINT and exit gracefully

--
-- Randolph Chung <tausq@debian.org> Fri, 21 Apr 2000 17:49:59 -0700

tasksel (1.0-7) frozen unstable; urgency=low



+ 0
- 1
debian/files View File

@@ -1 +0,0 @@
tasksel_1.0-3_i386.deb base optional

+ 3
- 2
slangui.c View File

@@ -1,7 +1,8 @@
/* $Id: slangui.c,v 1.16 2000/02/26 10:16:37 karlheg Exp $ */
/* $Id: slangui.c,v 1.17 2000/04/22 00:52:33 tausq Exp $ */
/* slangui.c - SLang user interface routines */
/* TODO: the redraw code is a bit broken, also this module is using way too many
* global vars */
#include "tasksel.h"
#include "slangui.h"
#include <slang.h>
#include <libintl.h>
@@ -70,7 +71,7 @@ void ui_init(int argc, char * const argv[], struct packages_t *taskpkgs, struct
_taskpackagesary = packages_enumerate(taskpkgs);
_packages = pkgs;
SLang_set_abort_signal(NULL);
SLang_set_abort_signal(tasksel_signalhandler);
/* assign attributes to objects */
SLtt_set_color(DEFAULTOBJ, NULL, "white", "blue");


+ 7
- 4
tasksel.c View File

@@ -1,4 +1,4 @@
/* $Id: tasksel.c,v 1.6 2000/02/07 01:09:53 tausq Exp $ */
/* $Id: tasksel.c,v 1.7 2000/04/22 00:52:33 tausq Exp $ */
#include "tasksel.h"

#include <stdio.h>
@@ -13,16 +13,18 @@
#include "data.h"
#include "macros.h"

static void signalhandler(int sig)
void tasksel_signalhandler(int sig)
{
switch (sig) {
case SIGWINCH:
ui_resize();
break;
case SIGINT:
ui_shutdown();
exit(0);
default:
DPRINTF("%s\n", _("Unknown signal seen"));
}
}

void help(void)
@@ -99,6 +101,7 @@ int doinstall(struct package_t **taskpkglist, int taskpkgcount,
return 1;
}
}

return 0;
}

@@ -110,7 +113,7 @@ int main(int argc, char * const argv[])
struct packages_t taskpkgs, packages;
struct package_t **pkglist, **taskpkglist;
signal(SIGWINCH, signalhandler);
signal(SIGWINCH, tasksel_signalhandler);
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE, LOCALEDIR);


+ 2
- 1
tasksel.h View File

@@ -1,7 +1,8 @@
/* $Id: tasksel.h,v 1.1 1999/11/21 22:01:04 tausq Exp $ */
/* $Id: tasksel.h,v 1.2 2000/04/22 00:52:33 tausq Rel $ */
#ifndef _TASKSEL_H
#define _TASKSEL_H

void help(void);
void tasksel_signalhandler(int sig);

#endif

Loading…
Cancel
Save