* TIOCSTI or workaround?
@ 2017-06-26 3:58 Greywolf
2017-06-26 4:04 ` Greywolf
2017-06-26 8:51 ` Corinna Vinschen
0 siblings, 2 replies; 4+ messages in thread
From: Greywolf @ 2017-06-26 3:58 UTC (permalink / raw)
To: cygwin
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?
--
--*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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: TIOCSTI or workaround?
2017-06-26 3:58 TIOCSTI or workaround? Greywolf
@ 2017-06-26 4:04 ` Greywolf
2017-06-26 8:51 ` Corinna Vinschen
2017-06-26 8:51 ` Corinna Vinschen
1 sibling, 1 reply; 4+ messages in thread
From: Greywolf @ 2017-06-26 4:04 UTC (permalink / raw)
To: cygwin
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: TIOCSTI or workaround?
2017-06-26 4:04 ` Greywolf
@ 2017-06-26 8:51 ` Corinna Vinschen
0 siblings, 0 replies; 4+ messages in thread
From: Corinna Vinschen @ 2017-06-26 8:51 UTC (permalink / raw)
To: cygwin
[-- Attachment #1: Type: text/plain, Size: 999 bytes --]
On Jun 25 21:04, Greywolf wrote:
> 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
That can't work. ioctl codes are platform specific.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: TIOCSTI or workaround?
2017-06-26 3:58 TIOCSTI or workaround? Greywolf
2017-06-26 4:04 ` Greywolf
@ 2017-06-26 8:51 ` Corinna Vinschen
1 sibling, 0 replies; 4+ messages in thread
From: Corinna Vinschen @ 2017-06-26 8:51 UTC (permalink / raw)
To: cygwin
[-- Attachment #1: Type: text/plain, Size: 552 bytes --]
On Jun 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.
That's because TIOCSTI isn't supported. You always get EINVAL when
using unknown ioctl codes.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-06-26 8:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-26 3:58 TIOCSTI or workaround? Greywolf
2017-06-26 4:04 ` Greywolf
2017-06-26 8:51 ` Corinna Vinschen
2017-06-26 8:51 ` Corinna Vinschen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).