Bug 11499 - set FIOSETOWN option in ioctl() function
Summary: set FIOSETOWN option in ioctl() function
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: kernel   
(Show other bugs)
Version: 6.0
Hardware: i386 Linux
Target Milestone: ---
Assignee: Arjan van de Ven
QA Contact: Brian Brock
Depends On:
TreeView+ depends on / blocked
Reported: 2000-05-18 09:22 UTC by YunQin Huang
Modified: 2008-08-01 16:22 UTC (History)
0 users

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

Attachments (Terms of Use)

Description YunQin Huang 2000-05-18 09:22:18 UTC
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 15:38:47 UTC
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.