Bug 73076 - ioctl returns invalid argument
ioctl returns invalid argument
Product: Red Hat Linux
Classification: Retired
Component: glibc (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2002-08-30 08:55 EDT by george.miller
Modified: 2016-11-24 09:52 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-12-15 17:49:32 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
source file to produce problem. (1.33 KB, text/plain)
2002-08-30 09:43 EDT, george.miller
no flags Details

  None (edit)
Description george.miller 2002-08-30 08:55:46 EDT
Description of Problem: process attempts to use ioctl to pas  file descriptor to another process. each of the ioctls fails with errno=22 (invalid argument)

Version-Release number of selected component (if applicable):

How Reproducible:compile and run attached source.

Steps to Reproduce:
1. compile attached source
2. run

Actual Results:ioctl from both processes return invalid argument.

Expected Results:file descriptor  should be passed and both processes write to disk file.

Additional Information:
Comment 1 george.miller 2002-08-30 09:43:56 EDT
Created attachment 73964 [details]
source file to produce problem.
Comment 2 Arjan van de Ven 2002-08-30 10:05:43 EDT
Why are you using the STREAMS ioctl instead of the posix SCM_RIGHTS interface ?
Solaris STREAMS are not supported in linux.
Comment 3 Arjan van de Ven 2002-08-30 10:06:06 EDT

has some example code fwiw
Comment 4 george.miller 2002-08-30 10:52:18 EDT
the main reason to use the ioctl is that the code is MUCH more straight forward (none of the recv,sendmsg bs) as well as the socket creation.  if the functionality 
(SEND_FD, RECV_FD) doesnt work, remove it, at least in the documentation. you can replace the pipe call with a socketpair, creating a unix domain pair of sockets 
and it still doesnt work.
 i was under the impression that streams were part of unix, not just solaris; i know that linux likes to do things its way sometimes rather than the unix way. that is not 
a support of the way that unix does things; just a comment on trying to be standardly uniform in the way features are implemented.
Comment 5 Ulrich Drepper 2002-08-31 05:17:16 EDT
STREAMS are not required by Unix anymore.  It is an optional part of Unix which
is not supported under Linux.  The only support in the official components
consists of the wrappers around the STREAMS syscalls.  That's all.  If anything
fails you're on your own.

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