Skip to contentSkip to conversation

Three major questions.

DISCUSSION Stas Sergeev 2 participants 2 messages Sep 11, 2003 – Sep 13, 2003

lore
Share & tools
lore
#0 lore raw

Hello.

Quoted 6 lines · Ryan Underwood
Quoted 5 lines

What dosemu version is this? There was an isatty() check added recently (but not *very* recently), see parser.y.in:1284. It supposed to fail if you are trying to use a virtual com port on a redirected stdio, so I don't think this way still works. Or is it?

This was with 1.0.2 stable IIRC.

OK, even in this case I can't imagine how this could work. Dosemu assumes that this is a tty in all the places around. For example it does
strcpy(sptr->dev, ttyname(0))
which leads to a SIGSEGV for apparent reasons in case stdio is redirected. That was the point of adding an isatty() check at first place.
Then it uses ioctl() for obtaining a serial port status. ioctl'ing socket will simply fail so the status will always be bogus. So actually I don't think this could ever work. There was a bug reports filled on SF that this doesn't work and segfaults, and then it was prohibited with an isatty() check and the better alternative of using a pseudo-tty's was added instead.

So it would be really usefull if you provide more info on how exactly have you done that and avoided all the underwater stones, and also how to do that with the recent dosemus.

#1 lore raw

Hi,

Quoted 28 lines · Stas Sergeev

Hello.

Quoted 6 lines · Ryan Underwood
Quoted 5 lines

What dosemu version is this? There was an isatty() check added recently (but not *very* recently), see parser.y.in:1284. It supposed to fail if you are trying to use a virtual com port on a redirected stdio, so I don't think this way still works. Or is it?

This was with 1.0.2 stable IIRC.

OK, even in this case I can't imagine how this could work. Dosemu assumes that this is a tty in all the places around. For example it does
strcpy(sptr->dev, ttyname(0))
which leads to a SIGSEGV for apparent reasons in case stdio is redirected. That was the point of adding an isatty() check at first place.
Then it uses ioctl() for obtaining a serial port status. ioctl'ing socket will simply fail so the status will always be bogus. So actually I don't think this could ever work. There was a bug reports filled on SF that this doesn't work and segfaults, and then it was prohibited with an isatty() check and the better alternative of using a pseudo-tty's was added instead.

Quoted 4 lines

So it would be really usefull if you provide more info on how exactly have you done that and avoided all the underwater stones, and also how to do that with the recent dosemus.

Sure, I'll try to put a little documentation together when I have some spare time.

Signature · 1 line
Ryan Underwood, <nemesis at icequake.net>, icq=10317253