First of all, let me say that I have little experience with pppd and pseudo-terminals. So, if you say to yourself, "Huh, what is this guy talking about," I probably didn't say it correctly :-)
The setup:
I have a bluetooth application which gets a master and slave pty device pair. Then an instance of pppd is spawned, and given the following arguments:
debug
nodetach
logfd 2
dump
name
SOMENAME@SOMEDOMAIN.COM
/dev/pts/0
115200
receive-all
ipcp-accept-remote
noipdefault
defaultroute
usepeerdns
:1.1.1.1
Finally, I have a test application which I want to use to open /dev/pts/0 (the slave device). I can open the /dev/pts/0 device, but I cannot read or write to it. I get a "Resource Temporarily Unavailable" error. (I've also tried to directly echo into it)
The question:
Does pppd lock (or make unavailable somehow) a slave device node that it is using? I have looked through the source code, and saw some stuff about locking, but I thought I would draw on the community experience before reverse engineering pppd :-)
Thank you.