Re: closing file in adjust_data_dir - Mailing list pgsql-hackers

From Japin Li
Subject Re: closing file in adjust_data_dir
Date
Msg-id MEYP282MB166946058F102913829CF1ECB6079@MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM
Whole thread Raw
In response to Re: closing file in adjust_data_dir  (Japin Li <japinli@hotmail.com>)
List pgsql-hackers
On Wed, 16 Nov 2022 at 10:02, Japin Li <japinli@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.



pgsql-hackers by date:

Previous
From: Ted Yu
Date:
Subject: Re: closing file in adjust_data_dir
Next
From: Justin Pryzby
Date:
Subject: Re: Documentation for building with meson