diff -cr ../cvs-pgsql/src/backend/postmaster/pgarch.c ./src/backend/postmaster/pgarch.c
*** ../cvs-pgsql/src/backend/postmaster/pgarch.c	2007-11-26 13:29:36.000000000 +0100
--- ./src/backend/postmaster/pgarch.c	2007-12-11 17:10:50.000000000 +0100
***************
*** 474,494 ****
  	rc = system(xlogarchcmd);
  	if (rc != 0)
  	{
! 		/*
! 		 * If either the shell itself, or a called command, died on a signal,
! 		 * abort the archiver.	We do this because system() ignores SIGINT and
! 		 * SIGQUIT while waiting; so a signal is very likely something that
! 		 * should have interrupted us too.	If we overreact it's no big deal,
! 		 * the postmaster will just start the archiver again.
! 		 *
! 		 * Per the Single Unix Spec, shells report exit status > 128 when a
! 		 * called command died on a signal.
! 		 */
! 		bool		signaled = WIFSIGNALED(rc) || WEXITSTATUS(rc) > 128;
! 
! 		ereport(signaled ? FATAL : LOG,
! 				(errmsg("archive command \"%s\" failed: return code %d",
! 						xlogarchcmd, rc)));
  
  		return false;
  	}
--- 474,514 ----
  	rc = system(xlogarchcmd);
  	if (rc != 0)
  	{
! 		if (WIFEXITED(rc))
! 		{
! 			ereport(LOG,
! 					(errmsg("archive command failed with exit code %d", WEXITSTATUS(rc)),
! 					 errdetail("The archive command was \"%s\".", xlogarchcmd)));
! 		}
! 		else if (WIFSIGNALED(rc))
! 		{
! 			/*
! 			 * If either the shell itself, or a called command, died
! 			 * on a signal, abort the archiver. We do this because
! 			 * system() ignores SIGINT and SIGQUIT while waiting; so a
! 			 * signal is very likely something that should have
! 			 * interrupted us too. If we overreact it's no big deal,
! 			 * the postmaster will just start the archiver again.
! 			 */
! 			ereport(FATAL, (
! #if defined(WIN32)
! 						errmsg("archive command was terminated by exception 0x%X", WTERMSIG(rc)),
! 						errhint("See C include file \"ntstatus.h\" for a description of the hexadecimal value."),
! #elif defined(HAVE_DECL_SYS_SIGLIST) && HAVE_DECL_SYS_SIGLIST
! 						errmsg("archive command was terminated by signal %d: %s",
! 							   WTERMSIG(rc),
! 							   WTERMSIG(rc) < NSIG ? sys_siglist[WTERMSIG(rc)] : "(unknown)"),
! #else
! 						errmsg("archive command was terminated by signal %d", WTERMSIG(exitstatus)),
! #endif
! 						errdetail("The archive command was \"%s\".", xlogarchcmd)));
! 		}
! 		else
! 		{
! 			ereport(LOG,
! 					(errmsg("archive command exited with unrecognized status %d", rc),
! 					 errdetail("The archive command was \"%s\".", xlogarchcmd)));
! 		}
  
  		return false;
  	}
