From mboxrd@z Thu Jan 1 00:00:00 1970 From: lm@mcvoy.com (Larry McVoy) Date: Tue, 26 Sep 2017 19:02:14 -0700 Subject: [TUHS] UNIX of choice these days? In-Reply-To: References: <1506341239.18395.for-standards-violators@oclsc.org> <20170925151827.GP28606@mcvoy.com> <646c7556-8300-d4ab-47fd-633352ea18e7@case.edu> <20170926145326.GX28606@mcvoy.com> Message-ID: <20170927020214.GG28606@mcvoy.com> On Tue, Sep 26, 2017 at 09:37:13PM -0400, Chet Ramey wrote: > On 9/26/17 8:58 PM, Dave Horsfall wrote: > > On Tue, 26 Sep 2017, Grant Taylor wrote: > > > >>> Exactly; why 255 of all things? > >> > >> High order of 8 bits??? (Assuming low order starts at 0.) > > > > Yeah, but still doesn't answer the question, application-wise.?? I'm gonna > > guess (without digging through the source) that it's a "dup2(0, 255)*" or > > something, to "save" a copy of stdin/out/err for some obscure reason. > > I already answered this. OK, I'm gonna be that guy because I've learned when I ask, I learn. You answered but I didn't get any insight. Why have an extra fd talking to the tty? bash has 0, 1, 2 talking to it. If it were redirected would it have 255 pointing to some random tty? I don't get the reason for the extra fd.