X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=qNI/0gv6ul1q+q+D EVem+8iN27iRm4maslSH6tQAi9B3TseT2NYnqTt63T47wl5/nL7VzaJCccO0I+28 KOYIKlkPCARn2yQjqCLWEyUKp9RY0PDS4565A4K4ga0VTgE6hAyrRGeRDtK4wRyz 5Ca8AJ4ruBU16GPM3nd3miXKZok= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=BA7bz4pIkEfN7Un2Kj5PLK l4Ekc=; b=r1DGK/3FqcdP2RJ8HkAWVUtzsPSrIucZoR46ka24yQbITKupUMUlNN Ib8mVgG0d6ITVvL4iPrrGewpnRVZNjr4zN3BEPsm2pqXrCg9A7pvRqPlPfH47ffA Vt94hx1a1pozLzbFEDEplEA2BfT9pQmVQscUURzjowokVQU/IjTgM= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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 Subject: Re: TIOCSTI or workaround? To: cygwin AT cygwin DOT com References: <16ace46e-4409-03b5-04b4-32974ae2aed3 AT starwolf DOT com> From: Greywolf Message-ID: <33454913-b374-5fb7-6a5b-a2178fee89ff@starwolf.com> Date: Sun, 25 Jun 2017 21:04:17 -0700 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 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