Bug 73076

Summary: ioctl returns invalid argument
Product: [Retired] Red Hat Linux Reporter: george.miller
Component: glibcAssignee: Jakub Jelinek <jakub>
Status: CLOSED NOTABUG QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.2CC: drepper, fweimer
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-12-15 22:49:32 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
source file to produce problem. none

Description george.miller 2002-08-30 12:55:46 UTC
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
3. 

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 13:43:56 UTC
Created attachment 73964 [details]
source file to produce problem.

Comment 2 Arjan van de Ven 2002-08-30 14:05:43 UTC
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 14:06:06 UTC
http://lists.canonical.org/pipermail/kragen-hacks/2002-January/000292.html

has some example code fwiw

Comment 4 george.miller 2002-08-30 14:52:18 UTC
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 09:17:16 UTC
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.