view toys/pwd.c @ 73:fb56ba93afa3

Teach pwd to detect write errors.
author Rob Landley <rob@landley.net>
date Sat, 20 Jan 2007 22:59:00 -0500
parents 6475d6c46066
children 7c77c6ec17ee
line wrap: on
line source

/* vi: set sw=4 ts=4: */
/*
 * pwd.c - Print working directory.
 */

#include "toys.h"

int pwd_main(void)
{
	char *pwd = xgetcwd();

	xprintf("%s\n", pwd);
	if (CFG_TOYS_FREE) free(pwd);

	return 0;
}