Re: dlopen() on a fifo
Jed Davis <[email protected]>
| Newsgroups | gmane.os.netbsd.devel.general |
|---|---|
| Message-ID | <[email protected]> |
[email protected] (Matthias Scheler) writes: > Kirk Russell <[email protected]> writes: >> I am using NetBSD 3.0. I found that dlopen() will block if the given >> path is a fifo: >> >> $ mkfifo -m a+wrx afifo >> $ ksh -c "LD_PRELOAD=./afifo /usr/bin/true" >> [... blocked ...] >> >> Is this expected behaviour? > > Yes. Processes get blocked if they try to read from a FIFO and there is > no writer. More to the point, the *open* will block if there's nothing on the other end (and O_NONBLOCK hasn't been given). -- (let ((C call-with-current-continuation)) (apply (lambda (x y) (x y)) (map ((lambda (r) ((C C) (lambda (s) (r (lambda l (apply (s s) l)))))) (lambda (f) (lambda (l) (if (null? l) C (lambda (k) (display (car l)) ((f (cdr l)) (C k))))))) '((#\J #\d #\D #\v #\s) (#\e #\space #\a #\i #\newline)))))