#include <unistd.h>
#define NODEFINE

#include <u.h>
#include <libc.h>

void
pm__exits(char *s)
{
	char buf[30];

	if(pm_debug&PmDebugExit){
		if(argv0){
			write(2, argv0, strlen(argv0));
			write(2, ": ", 2);
		}
		pm_snprint(buf, sizeof buf, "%d: ", getpid());
		write(2, buf, strlen(buf));
		if(s)
			write(2, s, strlen(s));
		write(2, "\n", 1);
	}
	if(s && s[0])
		_exit(1);
	_exit(0);
}
