Execlp: No such file or directory

Hi,

I am getting some weird behaviour with the thread monitor tool on Ubuntu 20.04 giving the error

execlp: No such file or directory

System:

$ uname -a
Linux neon 5.14.0-1032-oem #35-Ubuntu SMP Thu Mar 31 12:49:29 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Steps to reproduce

  • Start swipl in a console
$ swipl
Welcome to SWI-Prolog (threaded, 64 bits, version 8.5.4-34-g8c2cd4a78)
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software.
Please run ?- license. for legal details.

For online help and background, visit https://www.swi-prolog.org
For built-in help, use ?- help(Topic). or ?- apropos(Word).
  • Get the PCE tools
?- manpce.
true.
  • Start the Prolog thread monitor
XPCE Manual (Window)
Tools -> Prolog thread monitor
  • Start a new thread
SWI-Prolog thread monitor (Window)
Threads -> New

This causes:

  1. The following error message in the original console
?- execlp: No such file or directory
  1. Hangs the console
?- halt.
^C^C
WARNING: By typing Control-C twice, you have forced an asynchronous
WARNING: interrupt.  Your only SAFE operations are: c(ontinue), p(id),
WARNING: s(stack) and e(xit).  Notably a(abort) often works, but
WARNING: leaves the system in an UNSTABLE state

Action (h for help) ? PID: 124474

Which can be killed in another terminal:

$ kill 124474
  1. The two XPCE windows are hung also (requiring xkill to rid them).

Best wishes,

Steve

I see. Message could be better :slight_smile: The solution is

sudo apt install xterm

A secondary console uses xterm as that has some commandline options we need (-Scnn) that no modern terminal emulator has (AFAIK).