delorie.com/archives/browse.cgi | search |
Message-ID: | <3E0EA6CF.51896D97@yahoo.com> |
From: | CBFalconer <cbfalconer AT yahoo DOT com> |
Organization: | Ched Research |
X-Mailer: | Mozilla 4.75 [en] (Win98; U) |
X-Accept-Language: | en |
MIME-Version: | 1.0 |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Detecting stdin not redirected |
Lines: | 15 |
Date: | Sun, 29 Dec 2002 07:40:30 GMT |
NNTP-Posting-Host: | 12.90.167.143 |
X-Complaints-To: | abuse AT worldnet DOT att DOT net |
X-Trace: | bgtnsc05-news.ops.worldnet.att.net 1041147630 12.90.167.143 (Sun, 29 Dec 2002 07:40:30 GMT) |
NNTP-Posting-Date: | Sun, 29 Dec 2002 07:40:30 GMT |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
With gcc and DJGPP, how can a running program detect that stdin has not been redirected from the keyboard? How portable is such a method, i.e. will it hold up for Linux? To allow for use of external terminals, I guess the thing wanted is to detect that stdin is actually a disk file (or a pipe) as opposed to a device. There are bits available with some calls or other in the DOS interrupt group, but I guess the question is how exposed are these, and obviously any such will not be Linux portable. -- Chuck F (cbfalconer AT yahoo DOT com) (cbfalconer AT worldnet DOT att DOT net) Available for consulting/temporary embedded and systems. <http://cbfalconer.home.att.net> USE worldnet address!
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |