From owner-freebsd-emulation Tue Aug 25 21:22:04 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id VAA06023 for freebsd-emulation-outgoing; Tue, 25 Aug 1998 21:22:04 -0700 (PDT) (envelope-from owner-freebsd-emulation@FreeBSD.ORG) Received: from morannon.fido.de (morannon.faho.RWTH-Aachen.DE [134.130.57.8]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id VAA05993 for ; Tue, 25 Aug 1998 21:22:00 -0700 (PDT) (envelope-from freebsd-emulation@bland.fido.de) Received: from morannon-ftn.fido.de (news@localhost) by morannon.fido.de (8.8.7/8.8.5/morannon-check-4.4) with FIDOGATE id GAA02476; Wed, 26 Aug 1998 06:25:46 +0200 Received: by sungate-ftn.fido.de (FIDOGATE 4.2.9) id AA02274; Wed, 26 Aug 1998 06:25:13 +0200 Date: Tue, 25 Aug 1998 22:32:24 +0200 From: freebsd-emulation@bland.fido.de (freebsd-emulation) Reply-To: tobi@bland.fido.de (Tobias Ernst) Subject: Linux termios problem Message-ID: To: freebsd-emulation@FreeBSD.ORG (UUCP) Organization: Fido.DE domain gateway (IN e.V.) Lines: 46 X-Gateway: FIDO morannon.fido.de [FIDOGATE 4.2.9] X-FTN-From: freebsd-emulation @ 242:7600/1.0 X-FTN-To: UUCP @ 242:4900/99.0 X-FTN-Via: 242:7600/2@fido.de @19980826.023129.UTC FastEcho 1.45a 41347 X-FTN-Via: FIDOGATE/ftntoss 242:1000/1, Wed Aug 26 1998 at 06:25:08 MEST X-FTN-Domain: Z242@fidode MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hello! I am running FreeBSD 2.2.5 and seem to have a problem with the termios code of the Linux emulation. In order to implement something like "kbhit()" (a function to query if any characters are waiting in the console input queue), I use code similar to the following example program: #include #include int main(void) { struct termios tios; char c; tcgetattr(0, &tios); tios.c_lflag &= ~(ICANON | ISIG); tios.c_lflag &= ~ECHO; tios.c_cc[VMIN] = 0; tios.c_cc[VTIME] = 0; tcsetattr(0, 0, &tios); setbuf(stdin, NULL); c = getchar(); return c; } With the flags that I set, the getchar() function is supposed to return immediately even if no character could be read. (In this case, it should return EOF and I afterwards have to clear the errorflag from stdin, but this does not matter for the test program). The code from above works if I compile it natively for FreeBSD, and it works if I compile it with the linux crossdevelopment package and run the executable on a Linux box. However, it does not work if I try to run the resulting Linux executable on FreeBSD in Linux emulation mode. There, the getchar() function blocks for a very long time (minutes) before it returns. Is this a bug in my code (if so, please tell me where), or is it a problem with the Linux emulation of FreeBSD? Viele Gruesse, Tobias To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message From owner-freebsd-emulation Thu Aug 27 08:42:23 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id IAA26638 for freebsd-emulation-outgoing; Thu, 27 Aug 1998 08:42:23 -0700 (PDT) (envelope-from owner-freebsd-emulation@FreeBSD.ORG) Received: from fandago.read.tasc.com (fandago.read.tasc.com [147.81.243.218]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id IAA26608 for ; Thu, 27 Aug 1998 08:42:12 -0700 (PDT) (envelope-from icooper@protopong.ReAd.TASC.COM) Received: from protopong.read.tasc.com by fandago.read.tasc.com (4.1/TASC-1.9) id AA24279; Thu, 27 Aug 98 11:41:08 EDT Received: by protopong.read.tasc.com (SMI-8.6/SMI-SVR4) id LAA06056; Thu, 27 Aug 1998 11:41:07 -0400 Date: Thu, 27 Aug 1998 11:41:07 -0400 Message-Id: <199808271541.LAA06056@protopong.read.tasc.com> From: Ira Cooper To: freebsd-emulation@FreeBSD.ORG Subject: Improving Linux Emulation, XBF Server. Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hello, I'm interested in getting RedHat's XBF server running on my FreeBSD -STABLE laptop. I can probably do the development work needed to do this, (I actually had the server up but not able to receieve keystrokes at one point, but I don't have the source from it any more, besides it only took one night ;-) What I'd like to know is, if I emulate the needed ioctl's and iopl on -STABLE could someone help me port this forward to -CURRENT, because I don't have a -CURRENT machine and I'd like for the changes to make 2.2.8 if possible, so I know they need to be tested in -CURRENT. Any help or advice is apprecated, if there's interest if/when I get back to the point where I can bring the server up w/o keyboard support, I can post patches/diffs for review and help. Hardware info: I have a Libretto 100CT, with 64MB Ram and 2gb of disk. It has a 3COM 589D, and a Practical Perphial's 56k modem in it's slots most of the time. Thanks, -Ira BTW: If your going to help, I recommend you have some other way to get on the laptop other than console so, when you hose the console you can shut down the machine cleanly. It makes the process MUCH faster. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message From owner-freebsd-emulation Thu Aug 27 09:39:36 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id JAA06276 for freebsd-emulation-outgoing; Thu, 27 Aug 1998 09:39:36 -0700 (PDT) (envelope-from owner-freebsd-emulation@FreeBSD.ORG) Received: from word.smith.net.au (castles229.castles.com [208.214.165.229]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id JAA06270 for ; Thu, 27 Aug 1998 09:39:30 -0700 (PDT) (envelope-from mike@word.smith.net.au) Received: from word.smith.net.au (localhost [127.0.0.1]) by word.smith.net.au (8.9.1/8.8.8) with ESMTP id JAA03959; Thu, 27 Aug 1998 09:36:52 GMT (envelope-from mike@word.smith.net.au) Message-Id: <199808270936.JAA03959@word.smith.net.au> X-Mailer: exmh version 2.0.2 2/24/98 To: Ira Cooper cc: freebsd-emulation@FreeBSD.ORG Subject: Re: Improving Linux Emulation, XBF Server. In-reply-to: Your message of "Thu, 27 Aug 1998 11:41:07 -0400." <199808271541.LAA06056@protopong.read.tasc.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 27 Aug 1998 09:36:51 +0000 From: Mike Smith Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > I'm interested in getting RedHat's XBF server running on my > FreeBSD -STABLE laptop. I can probably do the development work needed > to do this, (I actually had the server up but not able to receieve > keystrokes at one point, but I don't have the source from it any more, > besides it only took one night ;-) Without knowing what this product is, it's hard to know whether it's worth getting enthused about. > What I'd like to know is, if I emulate the needed ioctl's and > iopl on -STABLE could someone help me port this forward to -CURRENT, > because I don't have a -CURRENT machine and I'd like for the changes to > make 2.2.8 if possible, so I know they need to be tested in -CURRENT. It would be pretty straightforward in most cases. -- \\ Sometimes you're ahead, \\ Mike Smith \\ sometimes you're behind. \\ mike@smith.net.au \\ The race is long, and in the \\ msmith@freebsd.org \\ end it's only with yourself. \\ msmith@cdrom.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message