mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +03:00 
			
		
		
		
	Add error checking for starting a win32 service using pg_ctl.
This commit is contained in:
		@@ -4,7 +4,7 @@
 | 
				
			|||||||
 *
 | 
					 *
 | 
				
			||||||
 * Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
 | 
					 * Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.50 2004/12/21 17:38:01 momjian Exp $
 | 
					 * $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.51 2004/12/21 17:58:30 momjian Exp $
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *-------------------------------------------------------------------------
 | 
					 *-------------------------------------------------------------------------
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
@@ -1078,7 +1078,11 @@ pgwin32_doRunAsService(void)
 | 
				
			|||||||
	SERVICE_TABLE_ENTRY st[] = {{register_servicename, pgwin32_ServiceMain},
 | 
						SERVICE_TABLE_ENTRY st[] = {{register_servicename, pgwin32_ServiceMain},
 | 
				
			||||||
	{NULL, NULL}};
 | 
						{NULL, NULL}};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	StartServiceCtrlDispatcher(st);
 | 
						if (StartServiceCtrlDispatcher(st)) == 0)
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							write_stderr(_("%s: could not start service \"%s\": error code %d\n"), progname, register_servicename, (int) GetLastError());
 | 
				
			||||||
 | 
							exit(1);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user