Did you know ... Search Documentation:
Predicate quit_pager/1
 quit_pager(+Terminal) is det[private]
If the Prolog thread of Terminal is waiting for its pager, tell the pager to quit. All common pagers quit on q.