Exit silently on IOException Broken Pipe #44

Open
opened 2025-11-26 12:21:54 +01:00 by ni · 1 comment
ni commented 2025-11-26 12:21:54 +01:00 (Migrated from git.w21.org)

When feeding data to a pipe that is closed by the reader, lyk throws an IOException "Broken Pipe":

#3 /Users/jnic/bin/primes:1 #<environment11348[1:2]{next=228593, end=nil}>
   (format t "~A~%" next)
#2 /Users/jnic/bin/primes:1 #<environment11348[1:2]{next=228593, end=nil}>
   (while (or (null end) (<= next end)) (setf next (next-prime next)) (format[…]
#1 /Users/jnic/bin/primes:1 #<environment1[root:87]{...}>
   (let ((next (if (>= (length *command-line-args*) 1) (- (read (car *command[…]
#3 /Users/jnic/bin/primes:1 #<environment11348[1:2]{next=228593, end=nil}>
   (format t "~A~%" next)
#2 /Users/jnic/bin/primes:1 #<environment11348[1:2]{next=228593, end=nil}>
   (while (or (null end) (<= next end)) (setf next (next-prime next)) (format[…]
#1 /Users/jnic/bin/primes:1 #<environment1[root:87]{...}>
   (let ((next (if (>= (length *command-line-args*) 1) (- (read (car *command[…]

That is ugly and unwelcome. Lyk should behave like any good Unix citizen and exit silently.

When feeding data to a pipe that is closed by the reader, lyk throws an IOException "Broken Pipe": ```IOError: IOException: Broken pipe #3 /Users/jnic/bin/primes:1 #<environment11348[1:2]{next=228593, end=nil}> (format t "~A~%" next) #2 /Users/jnic/bin/primes:1 #<environment11348[1:2]{next=228593, end=nil}> (while (or (null end) (<= next end)) (setf next (next-prime next)) (format[…] #1 /Users/jnic/bin/primes:1 #<environment1[root:87]{...}> (let ((next (if (>= (length *command-line-args*) 1) (- (read (car *command[…] #3 /Users/jnic/bin/primes:1 #<environment11348[1:2]{next=228593, end=nil}> (format t "~A~%" next) #2 /Users/jnic/bin/primes:1 #<environment11348[1:2]{next=228593, end=nil}> (while (or (null end) (<= next end)) (setf next (next-prime next)) (format[…] #1 /Users/jnic/bin/primes:1 #<environment1[root:87]{...}> (let ((next (if (>= (length *command-line-args*) 1) (- (read (car *command[…] ``` That is ugly and unwelcome. Lyk should behave like any good Unix citizen and exit silently.
ni commented 2025-11-26 12:21:55 +01:00 (Migrated from git.w21.org)

assigned to @ni

assigned to @ni
ni self-assigned this 2026-05-07 17:40:33 +02:00
Sign in to join this conversation.
No description provided.