File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -256,25 +256,24 @@ get_pgpid(bool is_status_request)
256256 if (stat (pg_data , & statbuf ) != 0 )
257257 {
258258 if (errno == ENOENT )
259- printf (_ ("%s: directory \"%s\" does not exist\n" ), progname ,
260- pg_data );
259+ write_stderr (_ ("%s: directory \"%s\" does not exist\n" ), progname ,
260+ pg_data );
261261 else
262- printf (_ ("%s: cannot access directory \"%s\"\n" ), progname ,
263- pg_data );
262+ write_stderr (_ ("%s: could not access directory \"%s\": %s \n" ), progname ,
263+ pg_data , strerror ( errno ) );
264264
265265 /*
266266 * The Linux Standard Base Core Specification 3.1 says this should
267267 * return '4, program or service status is unknown'
268- * https://refspecs.linuxbase.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-g
269- * eneric/iniscrptact.html
268+ * https://refspecs.linuxbase.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html
270269 */
271270 exit (is_status_request ? 4 : 1 );
272271 }
273272
274273 if (stat (version_file , & statbuf ) != 0 && errno == ENOENT )
275274 {
276- printf (_ ("%s: directory \"%s\" is not a database cluster directory\n" ),
277- progname , pg_data );
275+ write_stderr (_ ("%s: directory \"%s\" is not a database cluster directory\n" ),
276+ progname , pg_data );
278277 exit (is_status_request ? 4 : 1 );
279278 }
280279
You can’t perform that action at this time.
0 commit comments