Skip to content

Drop "pseudo" serial devices when fd is closed #2102

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 22, 2023

Conversation

jordemort
Copy link
Contributor

This sets the modem status lines for a "pseudo" serial port to zero when the associated file descriptor is closed. This is useful when using DOSEMU2 to launch BBS doors and other programs designed to communicate over a modem; it allows such programs to detect when the other side of the connection has been closed.

Some caveats:

  • There is no way to "reconnect" once the file descriptor has been closed, but I don't think there'd be any way to reopen the file descriptor from the other end anyway, so I don't think this is a problem
  • I'm not sure if setting MSRs to 0 here is the right thing or if I should only drop DCD. I think the difference is between simulating "lost carrier" vs simulating "someone yanked the modem cord out of the serial port" - 0 seems to get applications to behave the way I want it to, though.

Re: #2101

This sets the modem status lines for a "pseudo" serial port to zero
when the associated file descriptor is closed. This is useful when
using DOSEMU2 to launch BBS doors and other programs designed to
communicate over a modem; it allows such programs to detect when the
other side of the connection has been closed.
@stsp stsp merged commit 5a001d2 into dosemu2:devel Sep 22, 2023
@stsp
Copy link
Member

stsp commented Sep 22, 2023

Thanks.

@jordemort jordemort deleted the drop-closed-pseudo-serial branch September 22, 2023 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants