From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 98049 invoked by alias); 26 Jun 2017 04:04:33 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 97989 invoked by uid 89); 26 Jun 2017 04:04:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=death, died X-HELO: eddie.starwolf.com Received: from eddie.starwolf.com (HELO eddie.starwolf.com) (69.12.250.42) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 26 Jun 2017 04:04:27 +0000 Received: from [172.21.12.13] (smaug [172.21.12.1]) by eddie.starwolf.com (Postfix) with ESMTP id 3F0011A4C0 for ; Sun, 25 Jun 2017 21:04:20 -0700 (PDT) Subject: Re: TIOCSTI or workaround? To: cygwin@cygwin.com References: <16ace46e-4409-03b5-04b4-32974ae2aed3@starwolf.com> From: Greywolf Message-ID: <33454913-b374-5fb7-6a5b-a2178fee89ff@starwolf.com> Date: Mon, 26 Jun 2017 04:04:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <16ace46e-4409-03b5-04b4-32974ae2aed3@starwolf.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2017-06/txt/msg00326.txt.bz2 On 2017-06-25 20:58, Greywolf wrote: > Greetings, > > I have a program I've writ which takes input and types on to other > terminals; however, it seems that under Cygwin, TIOCSTI on a file > descriptor doesn't work according to plan -- I get "Invalid argument", > but I don't know why. > > Did a read on ioctl, and saw something about POSIX STREAMS. I thought > that paradigm had died a mean nasty ugly death YEARS back, but I'm > hoping that's entirely beside the point. > > Does there exist a way to successfully call > > ioctl(fd, TIOCSTI, (char *)cp) > > or is there a workaround? Addendum: I used the "standard" TIOCSTI definition of: #define TIOCSTI 0x5214 [or whatever it is, under Linux -- can't check right now]. Perhaps it is just that IOCTL directive which is out of whack. Basic conceptual question still stands... -- --*greywolf; -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple