Re: closing file in adjust_data_dir

Поиск
Список
Период
Сортировка
Искать
От
Japin Li
Тема
Re: closing file in adjust_data_dir
Дата
Msg-id
MEYP282MB166946058F102913829CF1ECB6079@MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM
Ответ на
Список
Дерево обсуждения
closing file in adjust_data_dir Ted Yu <yuzhihong@gmail.com>
Re: closing file in adjust_data_dir Ted Yu <yuzhihong@gmail.com>
Re: closing file in adjust_data_dir Japin Li <japinli@hotmail.com>
Re: closing file in adjust_data_dir Ted Yu <yuzhihong@gmail.com>
Re: closing file in adjust_data_dir Japin Li <japinli@hotmail.com>
Re: closing file in adjust_data_dir Ted Yu <yuzhihong@gmail.com>
Re: closing file in adjust_data_dir Japin Li <japinli@hotmail.com>
Re: closing file in adjust_data_dir Ted Yu <yuzhihong@gmail.com>
Re: closing file in adjust_data_dir Japin Li <japinli@hotmail.com>
Re: closing file in adjust_data_dir Ted Yu <yuzhihong@gmail.com>
Re: closing file in adjust_data_dir Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Re: closing file in adjust_data_dir Ted Yu <yuzhihong@gmail.com>
Re: closing file in adjust_data_dir Japin Li <japinli@hotmail.com>

On Wed, 16 Nov 2022 at 10:02, Japin Li  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 по дате отправления
От: Ted Yu
Дата:
От: Justin Pryzby
Дата:
FAQ