Question on tty line discipline
Hi,
I have a question concerning the line discipline behaviour for serial
devices.
When the line discipline is set via ioctl from user space to e.g. N_PPP and the userspace program returns without resetting the line discipline back to N_TTY, the serial device cannot be used (ENODV) until an appropriate ioctl (to N_TTY) is performed. Is there any reason for the fact that the line discipline is not reset by the kernel , when closing the device.
Could you please CC me on answers and comments ?
Kind regards,
Christopher Meller
Signature · 14 lines
Christopher Meller Software engineer Innominate Security Technologies AG protecting industrial networks tel: +49.30.6392-3680 fax: +49.30.6392-3307 Albert-Einstein-Str. 14 D-12489 Berlin www.innominate.com Register Court: AG Charlottenburg, HR B 81603 Management Board: Joachim Fietz, Dirk Seewald Chairman of the Supervisory Board: Edward M. Stadum
Quoted 5 lines · On Wed, 28 Feb 2007 14:47:12 +0100 Christopher Meller <[email protected]>…
Hi,
I have a question concerning the line discipline behaviour for serial
devices.
When the line discipline is set via ioctl from user space to e.g.N_PPPand the userspace program returns without resetting the line discipline back toN_TTY, the serial device cannot be used (ENODV) until an appropriate ioctl (toN_TTY) is performed. Is there any reason for the fact that the line discipline is not reset by the kernel , when closing the device.
No special reason, it has simply always been that way. Getty and friends are expected to put the tty back into a sane state.
Am 28.02.2007 14:47 schrieb Christopher Meller:
Quoted 1 line
When the line discipline is set via ioctl from user space to e.g.
N_PPPand the userspace program returns without resetting the line discipline back toN_TTY, the serial device cannot be used (ENODV) until an appropriate ioctl (toN_TTY) is performed. Is there any reason for the fact that the line discipline is not reset by the kernel , when closing the device.
Is that really so? While testing a line discipline I have written myself (N_GIGASET_M101) I came to the opposite conclusion.
Specifically, when I set the line discipline on eg. /dev/ttyS1 to N_GIGASET_M101 from the user space daemon I have written for that purpose, and that user space daemon exits, my line discipline is removed, ie. its .close method is called. That is true even if I kill the user space daemon by sending it an uncaught signal.
Signature · 4 lines
Tilman Schmidt E-Mail: [email protected] Bonn, Germany Diese Nachricht besteht zu 100% aus wiederverwerteten Bits. Ungeöffnet mindestens haltbar bis: (siehe Rückseite)