On 10/07/2017 11:17, Marc-André Lureau wrote: > Parallel device don't register be->chr_can_read function, but remote > disconnect event is handled in chr_read. > So connected parallel device can not detect remote disconnect event. > > What is it that you call a parallel device? you are modifying the socket > code here. Could you describe a test setup? even better would be to > write a test in test-char.c.
If I understand the patch correctly, the parallel device is the parallel port emulation. It's still not clear to me what scenario the patch is fixing, and the patch is wrong anyway: 1) because the backend is not supposed to know the details of the frontend that is connected to it; 2) because the character device's label is not a reliable indicator for the frontend type (there is no such indicator, because of point 1). Paolo