Path: utzoo!news-server.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!unmvax!uokmax!servalan!rmtodd From: rmtodd@servalan.uucp (Richard Todd) Newsgroups: comp.unix.aux Subject: Re: ioctl problem in A/UX 2.0 Keywords: AUX, 2.0, ioctl, help Message-ID: <1991Mar9.023839.6801@servalan.uucp> Date: 9 Mar 91 02:38:39 GMT References: <2041@public.BTR.COM> Distribution: usa Organization: Ministry of Silly Walks Lines: 27 pke@public.BTR.COM (Peter Espen pke@btr.com) writes: >Can someone explain to me why the first ioctl call in the following test >program fails with an invalid argument error? Afraid not. It gets past that ioctl with no problems for me. >I am running A/UX 2.0. So am I. I don't know offhand why that ioctl should fail, unless somehow the char. special file "/dev/tty0" has gotten its major/minor numbers munged. (They're 0,0 on my system; I think they should be the same on all A/UX systems, though I'm not sure on this). While I'm here, however, I might as well point out one thing I noticed about your program, namely that it did segfault later on when I ran it, right at the fputs() : > if ((fp = open( name, O_RDWR | O_NDELAY)) == NULL) { >... > if (fputs(buf, fp) == NULL) open returns a file descriptor, and fputs, expecting a FILE pointer, gets rather out of sorts at being passed a file descriptor instead. -- Richard Todd rmtodd@uokmax.ecn.uoknor.edu rmtodd@chinet.chi.il.us rmtodd@servalan.uucp "Try looking in the Yellow Pages under 'Psychotics'." -- Michael Santana