Set sys.last_{type,value} to characteristics of last unhandled exception.
diff --git a/Python/pythonmain.c b/Python/pythonmain.c
index f7ff36c..b00a270 100644
--- a/Python/pythonmain.c
+++ b/Python/pythonmain.c
@@ -300,6 +300,8 @@
 			goaway(1);
 		}
 	}
+	sysset("last_type", exception);
+	sysset("last_value", v);
 	if (printobject(exception, stderr, PRINT_RAW) != 0)
 		err_clear();
 	if (v != NULL && v != None) {