Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Apr 1999 08:53:22 +0200
From:      Thomas Page <ThomasP@cat.co.za>
To:        "'freebsd-questions@FreeBSD.org'" <freebsd-questions@FreeBSD.org>
Subject:   Using SIGIO
Message-ID:  <81F5585A3B93D111A8D10080ADB4CBB9055A0B@DC>

next in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
Hi,
I am having trouble setting up a SIGIO for the serial port,
the point in question is that when I do a fcntl(fd,F_GETOWN)
or fcntl(fd,F_SETOWN,...), I get an "Inappropriate ioctl for
device". I have used "signal" and a signal handler, and have
set the serial port to "O_ASYNC", but this third requirment
(as per all the books I have) just will not work. Is it a
user rights issue, or am I way off track?

I have tried various other ideas, fcntl(fd,FASYNC),
ioctl(fd,TIOSPGRP)..., etc, etc, but all with various error
messages. I have even tried locking the fd, then unlocking
afterwards, no change.

Thanks


Thomas Page
CAT (Pty) Ltd - Advanced security Technology
thomasp@cat.co.za   (tompage@hotmail.com) +27 31 560 6556

"The proper 'office' of a friend is to side with you when
you are wrong. Nearly everyone will side with you when you
are right."	Mark Twain


[-- Attachment #2 --]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=US-ASCII">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.0.1460.9">
<TITLE>Using SIGIO</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2 FACE="Arial">Hi,</FONT>
<BR><FONT SIZE=2 FACE="Arial">I am having trouble setting up a SIGIO for the serial port, the point in question is that when I do a fcntl(fd,F_GETOWN) or fcntl(fd,F_SETOWN,...), I get an &quot;Inappropriate ioctl for device&quot;. I have used &quot;signal&quot; and a signal handler, and have set the serial port to &quot;O_ASYNC&quot;, but this third requirment (as per all the books I have) just will not work. Is it a user rights issue, or am I way off track?</FONT></P>

<P><FONT SIZE=2 FACE="Arial">I have tried various other ideas, fcntl(fd,FASYNC), ioctl(fd,TIOSPGRP)..., etc, etc, but all with various error messages. I have even tried locking the fd, then unlocking afterwards, no change.</FONT></P>

<P><FONT SIZE=2 FACE="Arial">Thanks</FONT>
</P>
<BR>

<P><FONT FACE="Tahoma">Thomas Page<I></I></FONT><I></I>
<BR><I><FONT COLOR="#000000" SIZE=5 FACE="Arial Black">CAT</FONT></I><FONT COLOR="#000000" SIZE=1 FACE="Arial"></FONT><I> <FONT COLOR="#000000" SIZE=1 FACE="Arial">(Pty) Ltd</FONT></I><FONT COLOR="#000000" SIZE=1 FACE="Arial"> -</FONT><I> <FONT COLOR="#000000" SIZE=1 FACE="Arial">Advanced security Technology</FONT></I>
<BR><FONT SIZE=1 FACE="Tahoma">thomasp@cat.co.za&nbsp;&nbsp; (tompage@hotmail.com) +27 31 560 6556</FONT>
</P>

<P ALIGN=CENTER><FONT SIZE=1 FACE="Tahoma">&quot;The proper 'office' of a friend is to side with you when you are wrong. Nearly everyone will side with you when you are right.&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Mark Twain</FONT></P>

</BODY>
</HTML>

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?81F5585A3B93D111A8D10080ADB4CBB9055A0B>