Opened 5 years ago

#1371 new defect

unexpected behavior with poll and fifos on os x

Reported by: rme Owned by:
Priority: minor Milestone:
Component: other Version: trunk
Keywords: Cc:

Description

From stasats:

(let ((fifo #p"/tmp/fifo"))
       (unless (probe-file fifo)
         (with-utf-8-cstrs ((fifo (namestring fifo)))
           (#_mkfifo fifo  #o644)))
       (ccl:process-run-function nil
                                 (lambda ()
                                   (with-open-file (stream fifo :direction :output :if-exists :overwrite)
                                     (write-char #\a stream))))
       (with-open-file (stream fifo)
         (print (read-char stream))
         (ccl:with-input-timeout ((stream) 1000)
           (read-char stream))))

The second read-char blocks; it signals EOF on Linux. It signals EOF if no with-timeout is present.

echo -n a >/tmp/fifo will wake the poll up.

I (rme) seem to recall that poll on fifos just doesn't work right on Darwin.

Change History (0)

Note: See TracTickets for help on using tickets.