summaryrefslogtreecommitdiff
path: root/emulators/hercules/patches/patch-ai
diff options
context:
space:
mode:
Diffstat (limited to 'emulators/hercules/patches/patch-ai')
-rw-r--r--emulators/hercules/patches/patch-ai20
1 files changed, 20 insertions, 0 deletions
diff --git a/emulators/hercules/patches/patch-ai b/emulators/hercules/patches/patch-ai
new file mode 100644
index 00000000000..465b44512cb
--- /dev/null
+++ b/emulators/hercules/patches/patch-ai
@@ -0,0 +1,20 @@
+$NetBSD: patch-ai,v 1.1 2001/02/26 14:49:35 agc Exp $
+
+Fix for coredump on exit on NetBSD from Wolfgang Solfrank
+
+--- panel.c 2001/02/26 14:36:27 1.1
++++ panel.c 2001/02/26 14:40:30
+@@ -1798,6 +1798,13 @@
+ /* quit or exit command - terminate the emulator */
+ if (strcmp(cmd,"quit") == 0 || strcmp(cmd,"exit") == 0)
+ {
++ struct sched_param sp;
++ int p;
++
++ pthread_getschedparam(pthread_self(), &p, &sp);
++ sp.sched_priority = sched_get_priority_max(p);
++ pthread_setschedparam(pthread_self(), p, &sp);
++
+ sysblk.msgpipew = stderr;
+ devascii = strtok(cmd+4," \t");
+ if (devascii == NULL || strcmp("now",devascii))