Bug 73076 - ioctl returns invalid argument
Summary: ioctl returns invalid argument
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: glibc
Version: 7.2
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-08-30 12:55 UTC by george.miller
Modified: 2016-11-24 14:52 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2002-12-15 22:49:32 UTC
Embargoed:


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

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.


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