[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bluetooth-dev] pid check when closing "bug"

> > Remark on this last modification :
> >
> > Why should the pid be the same ? On my application, this test
> > fails causing
> > the kernel to crash when the tty is tried to be opened...
> Not on mine ;) Can you describe in detail what goes wrong ?

Yes, I can now.
The ttyBTx port is opened by pppd (in my example, the pppd pid is 46). If 
your system has a /etc/ppp/ip-down script, this script is launched when the 
ppp connection terminates :

Script /etc/ppp/ip-down started (pid 50)
BT (driver) Unregistering tty on line 0
BT (driver) bt_unregister_tty invalid pid.
Current : 50 session : 46                                                     
Script /etc/ppp/ip-down finished (pid 50)

So in this case the ttyBTx port is opened with one pid and closed with 
another one, and my script doesn't open or close any port...

> brgds
> /Mattias
To unsubscribe from this list: send the line "unsubscribe bluetooth-dev" in
the body of a message to majordomo@xxxxxxx.com