sharplispers / clx

a fork of crhodes' fork of danb's fork of the CLX library, an X11 client for Common Lisp
Other
114 stars 46 forks source link

Fix eof on kill #205

Closed dkochmanski closed 9 months ago

dkochmanski commented 9 months ago

This pull request supersedes #203. Before merging we need to test on:

It would be nice to also test on:

Minimal test:

Steps to reproduce:

> (ql:quickload 'clx/demo)
> (xlib-demo/demos:demo)

In a separate console launch xkill and select the window.

Correct behavior (in REPL):

CL-USER> (xlib-demo/demos:demo)
NIL
#<XLIB:CLOSED-DISPLAY {10087BB1F3}>

Incorrect behavior:

CL-USER> (xlib-demo/demos:demo)
NIL
#<SB-INT:BROKEN-PIPE "~@<~?~@[: ~2I~_~A~]~:>" {10091E3EF3}>

(substitute sbcl error with implementation-specific one).

dkochmanski commented 9 months ago

@yitzchak was kind enough to test on clasp, clisp and cmucl and there doesn't seem to be any regression. I've tested on ecl, ccl and sbcl and these work fine too. Since the functional change depends on portable common lisp, I'm assuming that lispworks and allegro also should work.