diff --git a/src/bin/pg_ctl/pg_ctl.c b/src/bin/pg_ctl/pg_ctl.c
index 2a00cd2..ab2c226 100644
--- a/src/bin/pg_ctl/pg_ctl.c
+++ b/src/bin/pg_ctl/pg_ctl.c
@@ -879,7 +879,8 @@
 				print_msg(_(" failed\n"));
 				write_stderr(_("%s: could not wait for server because of misconfiguration\n"),
 							 progname);
-				exit(1);
+				/* LSB: program is not configured */
+				exit(6);
 		}
 	}
 	else
@@ -900,7 +901,8 @@
 	{
 		write_stderr(_("%s: PID file \"%s\" does not exist\n"), progname, pid_file);
 		write_stderr(_("Is server running?\n"));
-		exit(1);
+		/* LSB: running stop on a service already stopped or not running */
+		exit(0);
 	}
 	else if (pid < 0)			/* standalone backend, not postmaster */
 	{
@@ -908,7 +910,8 @@
 		write_stderr(_("%s: cannot stop server; "
 					   "single-user server is running (PID: %ld)\n"),
 					 progname, pid);
-		exit(1);
+		/* LSB: unimplemented feature */
+		exit(3);
 	}
 
 	if (kill((pid_t) pid, sig) != 0)
@@ -1000,7 +1003,8 @@
 						   "single-user server is running (PID: %ld)\n"),
 						 progname, pid);
 			write_stderr(_("Please terminate the single-user server and try again.\n"));
-			exit(1);
+			/* LSB: unimplemented feature */
+			exit(3);
 		}
 	}
 
@@ -1076,7 +1080,8 @@
 	{
 		write_stderr(_("%s: PID file \"%s\" does not exist\n"), progname, pid_file);
 		write_stderr(_("Is server running?\n"));
-		exit(1);
+		/* LSB: program is not running */
+		exit(7);
 	}
 	else if (pid < 0)			/* standalone backend, not postmaster */
 	{
@@ -1085,7 +1090,8 @@
 					   "single-user server is running (PID: %ld)\n"),
 					 progname, pid);
 		write_stderr(_("Please terminate the single-user server and try again.\n"));
-		exit(1);
+		/* LSB: unimplemented feature */
+		exit(3);
 	}
 
 	if (kill((pid_t) pid, sig) != 0)
@@ -1116,7 +1122,8 @@
 	{
 		write_stderr(_("%s: PID file \"%s\" does not exist\n"), progname, pid_file);
 		write_stderr(_("Is server running?\n"));
-		exit(1);
+		/* LSB: program is not running */
+		exit(7);
 	}
 	else if (pid < 0)			/* standalone backend, not postmaster */
 	{
@@ -1124,7 +1131,8 @@
 		write_stderr(_("%s: cannot promote server; "
 					   "single-user server is running (PID: %ld)\n"),
 					 progname, pid);
-		exit(1);
+		/* LSB: unimplemented feature */
+		exit(3);
 	}
 
 	/* If recovery.conf doesn't exist, the server is not in standby mode */
@@ -1133,7 +1141,8 @@
 		write_stderr(_("%s: cannot promote server; "
 					   "server is not in standby mode\n"),
 					 progname);
-		exit(1);
+		/* LSB: reserved for application use */
+		exit(150);
 	}
 
 	if ((prmfile = fopen(promote_file, "w")) == NULL)
@@ -1233,10 +1242,10 @@
 	printf(_("%s: no server running\n"), progname);
 
 	/*
-	 * The Linux Standard Base Core Specification 3.1 says this should return
+	 * The Linux Standard Base Core Specification 4.1 says this should return
 	 * '3'
-	 * http://refspecs.freestandards.org/LSB_3.1.1/LSB-Core-generic/LSB-Core-ge
-	 * neric/iniscrptact.html
+	 * http://refspecs.linuxbase.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generi
+	 * c/iniscrptact.html
 	 */
 	exit(3);
 }