On Wed, 16 Nov 2022 at 10:02, Japin Li <japi...@hotmail.com> wrote: > I think we should check whether fd is NULL or not, otherwise, segmentation > fault maybe occur. > > + if (pclose(fd) != 0) > + { > + write_stderr(_("%s: could not close the file following command > \"%s\"\n"), progname, cmd); > + exit(1); > + }
Sorry for the noise, I misunderstand it. -- Regrads, Japin Li. ChengDu WenWu Information Technology Co.,Ltd.