Re: signed short fd
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql@mohawksoft.com
Cc: "Qingqing Zhou" <zhouqq@cs.toronto.edu>, pgsql-hackers@postgresql.org
Date: 2005-03-14T16:57:15Z
Lists: pgsql-hackers
pgsql@mohawksoft.com writes: > That is hardly anything that I would feel comfortable with. Lets break > this down into all the areas that are ambiguous: There isn't anything ambiguous about this, nor is it credible that there are implementations that don't follow the intent of the spec. Consider the standard paradigm for replacing stdout: you close(1) and then open() the target file. If the open() doesn't pick 1 as the fd, you're screwed. Every shell in the world would break atop such an implementation. It may well be the case that saving 4 bytes per VFD is useless micro-optimization. But the code isn't broken as it stands. regards, tom lane