Bug 11499 - set FIOSETOWN option in ioctl() function
set FIOSETOWN option in ioctl() function
Product: Red Hat Linux
Classification: Retired
Component: kernel (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Arjan van de Ven
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2000-05-18 05:22 EDT by YunQin Huang
Modified: 2008-08-01 12:22 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-09-30 11:38:47 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description YunQin Huang 2000-05-18 05:22:18 EDT
I wrote a UDP server on Linux systemand used signal-driven
I/O to receive datagram. That is, when a new UDP datagram
arrives, the server program will receive a SIGIO signal from
the kernel.
I wrote such code to prepare for this:
    /* set the signal handler */
    sigset(SIGIO, sigio_handler);

    /* set the owner of UDP socket */
    pid = getpid();
    if(ioctl(usock, FIOSETOWN, &pid) < 0){
        perror("ioctl FIOSETOWN");

    /* set socket as async mode to enable
     * signal driven I/O   */
    if(ioctl(usock, FIOASYNC, &on) < 0){
        perror("ioctl FIOASYNC");
When I ran UDP client and sent UDP datagrams,
the UDP server failed to work. I used tcpdump
and saw that datagrams had been transferred
successfully to the server machine. I sent signal
to UDP server using 'kill -SIGIO' command and
proved that the signal handler worked well.
I copied the source code to the Sun Solaris system
and compiled it. It worked well.
Then I returned back to Linux and changed the
FIOSETOWN of ioctl to SIOCSPGRP of ioctl. Two
options are the same. It failed to work as well.
At last, I changed
   ioctl(usock, FIOSETOWN, &pid)
   fcntl(usock, F_SETOWN, pid)
then succeeded.

Therefore, I think there is some bug in implementation
of setting FIOSETOWN option of ioctl() function.

My Linux version: Red Hat Linux 6.0,
kernel is 2.2.5-15 and the CPU is Pentium.
Comment 1 Bugzilla owner 2004-09-30 11:38:47 EDT
Thanks for the bug report. However, Red Hat no longer maintains this version of
the product. Please upgrade to the latest version and open a new bug if the problem

The Fedora Legacy project (http://fedoralegacy.org/) maintains some older releases, 
and if you believe this bug is interesting to them, please report the problem in
the bug tracker at: http://bugzilla.fedora.us/

Note You need to log in before you can comment on or make changes to this bug.