# Ann: SWI-Prolog 8.1.20

**URL:** https://swi-prolog.discourse.group/t/ann-swi-prolog-8-1-20/1699
**Category:** Releases
**Created:** [January 4, 2020, 1:06pm UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-8-1-20/1699 "2020-01-04T13:06:21Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![jan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jan/32/4_2.png) [@jan](https://swi-prolog.discourse.group/u/jan)
#### Post date: [January 4, 2020, 1:06pm UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-8-1-20/1699/1 "2020-01-04T13:06:21Z")

</div>

Dear SWI-Prolog user,

First of all, a good 2020! I’ve uploaded SWI-Prolog 8.1.20. This version  
does not bring not a lot of novel stuff, but it does address many  
important issues. Highlights:

- Fixed a number of issues affecting Pengines and SWISH that boosts  
the stability of SWISH.

- Avoid goal\_failed(http\_process/4) messages in the HTTP server. These  
were caused by the remote closing the connection before reading the  
entire document with a specific timing.

- A number of patches deal with handling multiple interactive toplevel  
loops (in threads). This mostly concerns I/O and thread management  
from C. These support the new [libssh](https://www.swi-prolog.org/pack/list?p=libssh) pack that allows for secure login to a Prolog process, providing  
a full shell including command line editing, history, interrupt (^C),  
color support, and redirect of the output of shell commands.

- Keri Harris found and fixed a possible asserting failure related to  
clause garbage collection.

- There is a new library(intercept), resulting from the discussion on  
error handling on this forum. This is based on Ciao’s design.

- The JPL .jar files now support Java 7 and up (used to depend on the  
Java version of the build machine, which varied between platforms).

- pack\_install/1 and friends can now deal with CMake based add-ons,  
running cmake if there is a CMakeLists.txt file in the toplevel of  
the pack. See the libssh pack for an example.

- Several contributed patches to the docs and tests by Boris Vassilev  
and C. M. Sperberg-McQueen.

# SWI-Prolog Changelog since version 8.1.19

- BUILD: Use `-DJAVA_COMPATIBILITY=ON` for building Windows and MacOS  
binaries

- FIXED: clause\_info/5 for `x==X`. @since  
d65c713cb2507a62b64d860a30246e05279bc522

- FIXED: clause\_info/5: avoid false binding if the arguments of =/2  
are reversed.

- ADDED: library(intercept): provide Ciao compatible intercept/signal  
API.

- ADDED: prolog\_frame\_attribute/3: attribute `parent_goal(Next)` to allow  
enumeration of parent goals. Needed for the new library(intercept).

- TEST: tests for library(dcg/high\_order)

- DOC: Correct a few typos, supply leading zeroes in ISO 8601-style dates

- FIXED: clause GC may mark indexes as dirty even though they do not  
include clauses being deleted

- MODIFIED: The debug utility mutex\_statistics/0 now prints its output  
to `current_output` such that it can be redirected and ends up in  
the new SSH consoles.

- ADDED: thread\_alias/1 to give a thread an alias name after creation.

- FIXED: PL\_thread\_attach\_engine() if this call fails, do not leave  
the thread-local variable pointing at the destroyed local data.

- FIXED: Handle ‘e’ in the debugger from a thread. Now safely terminates  
the thread using abort/0.

- ENHANCED: Properly handle console mode management if we are  
communicating with multiple TTY devices. This is needed to support  
the new `libssh` package.

- FIXED: on\_signal/3 not to fail if the signal is bound to a handler  
in a different module.

- DOC: Updated and clarified documentation for on\_signal/3.

- MODIFIED: on\_signal/2 now interprets `debug` as reserved handler name,  
triggering the default ^C handler.

- ENHANCED: library(prolog\_colour): qualified tabling declarations  
and avoid type error warnings on partially instantiated predicate  
indicators in declarations. The latter is a bit dubious as it will  
indicate variables in e.g. `:- dynamic p/N` just as singleton.  
It does however avoid a screaming warning when using dynamic in  
runtime calls from a computed arity.

- ENHANCED: CMake based packs to run `ctest` if the project defines  
tests.

- ADDED: Support configuration and building of foreign packs using  
CMake. This is triggered if the pack root directory contains  
`CMakeLists.txt`.

- MODIFIED: shell/1,2: if the `user_input`, `user_output` and  
`user_error` streams are connected to a file descriptors, `dup()`  
these to the process’ standard streams. This allows running shell  
commands and get the output in the expected place using the upcoming  
embedded SSH server.

- FIXED: set\_prolog\_IO/3: make sure the file\_no(N) stream property is  
relayed properly.

## Package clib

- FIXED: process\_create/3: `stderr` was sent to `stdout`. Reported by  
Jos Deroo. @since 9ea716e2c90fc359f03b1a838d9b764ca683608f

- MODIFIED: process\_create/3: `std` I/O now uses the file handles  
underlying `user_input`, `user_output` and `user_error` rather than  
the hard coded 0,1,2. This allows using process\_create/3 with standard  
handles in secondary consoles.

## Package http

- ENHANCED: Do not print errors to the console for sending files where  
the client aborts the connection before completion.

- FIXED: Avoid goal\_failed(http\_process/4 messages, possible if sending  
the main message results in a broken pipe error.

## Package libedit

- FIXED: el\_wrapped/1: avoid ignoring a possible exception.

- FIXED: el\_unwrap/1: avoid ignoring a possible exception.

## Package pengines

- FIXED: Avoid a race condition between a terminating Pengine and  
using its module for reading the next event arriving through HTTP.  
Access to the temporary module being destroyed is illegal.
