Re: [PATCH] Move is_valid_fd to filedescriptor.c file.

2019-08-09 Thread Ian Lance Taylor
On Fri, Aug 9, 2019 at 11:13 AM Jakub Jelinek wrote: > > On Fri, Aug 09, 2019 at 11:05:42AM -0700, Ian Lance Taylor wrote: > > > * Makefile.in: Add filedescriptor.c. > > > * filedescriptor.c: New file. > > > * lrealpath.c (is_valid_fd): Remove. > > > > > > I don't understan

Re: [PATCH] Move is_valid_fd to filedescriptor.c file.

2019-08-09 Thread Jakub Jelinek
On Fri, Aug 09, 2019 at 11:05:42AM -0700, Ian Lance Taylor wrote: > > * Makefile.in: Add filedescriptor.c. > > * filedescriptor.c: New file. > > * lrealpath.c (is_valid_fd): Remove. > > > I don't understand the dup2 fallback. It looks backward: if dup2(fd, > fd) will retu

Re: [PATCH] Move is_valid_fd to filedescriptor.c file.

2019-08-09 Thread Ian Lance Taylor
On Fri, Aug 9, 2019 at 12:15 AM Martin Liška wrote: > > As Jakub correctly noted, I used a piggy backing to put the new function > to a file that is supposed to contain different functions. So that > I'm suggesting a new file. Moreover, I'm also adding dup2 fallback. > > Patch can bootstrap on x86

[PATCH] Move is_valid_fd to filedescriptor.c file.

2019-08-09 Thread Martin Liška
Hi. As Jakub correctly noted, I used a piggy backing to put the new function to a file that is supposed to contain different functions. So that I'm suggesting a new file. Moreover, I'm also adding dup2 fallback. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be i