fsetown() and sockets (Was: Efficiency of ... SIGIO)

J. Collier james at cantuar.UUCP
Sun Feb 28 16:28:28 AEST 1988


Expires:

Sender:

Followup-To:

Distribution:


Bill Janssen (janssen at titan.SW.MCC.COM) writes:
>
>By the way, doing a "fcntl (socket_fd, F_SETOWN, getpid())" on a socket
>in order to specify that SIGIO's should be delivered when the socket
>has something to read, only seems to work when the process is the
>process group leader of its process group.  Is this correct behaviour?
>
    I notice that the 4.3 BSD kernel doesn't apply the usual 
distinction between process groups (negative) and process ID's when
performing an fsetown() on a socket descriptor - the argument is always
interpreted as a (positive) process group.
    Likewise fgetown() returns the process group of a socket descriptor
as a positive value. The manual entries for fcntl(2) and socket(2) don't
seem to make this clear.

    So much for the effective cause. No one seems to have taken up the
original question, so...

    Is there a rational explanation for this?

-------------------------
James Collier              Internet(ish):  james at cantuar.{uucp,nz}
Computer Science Dept.,    UUCP:           {watmath,munnari,mcvax}!cantuar!james
University of Canterbury,  Spearnet/Janet: j.collier at nz.ac.canty
Christchurch, New Zealand. Office: +64 3 482 009 x8356  Home: +64 3 554 025



More information about the Comp.unix.wizards mailing list