Conflict between use of /dev/pps and /dev/ppi?

Barry Bouwsma freebsd-misuser at remove-NOSPAM-to-reply.NOSPAM.netscum.dk
Mon Sep 15 14:32:34 PDT 2003


[NOTE:  IPv6-only e-mail above, so you probably want to drop me from
 the recipients and just send to the list, which I'll read later, as
 I'm not always online -- else remove JUST the hostname part to reveal
 an IPv4-aware e-mail for me that may still timeout and bounce.  Sorry.]


Hello hallowed hackers,

Be cautioned that this appears valid for RELENG_4 code way back from
December of 2002, and I'm pretty sure I haven't banged on either the
latest kernel source, or -CURRENT for that matter, as I'm still trying
to catch up.

I noticed that if I try to write a simple program to open /dev/ppi and
do things with it (that work, no less, sometimes), this fails so long
as ntpd has /dev/pps open (the parallel port nACK line is used for that).
Likewise, when I stop ntpd and run my program, then I'm unable to start
ntpd without it complaining about being unable to open /dev/pps.

Is there something I should be doing when opening /dev/ppi0 to free it
from /dev/pps0 ?  I can open /dev/ppi0 simultaneously by several
progams though.
crw-rw----  1 root  wheel   82,   0 Jan  6  2002 /dev/ppi0
crw-------  1 root  wheel   89,   0 Jul  3 14:45 /dev/pps0
The particular code I'm using looks like
        fd = open("/dev/ppi0", O_RDONLY  );

Or is this something within the kernel source that needs munging?

Apologies if it no longer (fails to) work this way, but I'm still
downloading and reviewing the last nine months of changes to the Internet.


Thanks,
Barry Bouwsma



More information about the freebsd-hackers mailing list