#include <libunix.h>
#include <stdio.h>
#include <iostream>
#include <sys/stat.h>

std::string moonix::mkfifo (void)
{
	char *fname = tempnam("/tmp", "ctl4j_");
	if (::mkfifo(fname, 0700) != 0)
		return NULL;
	return fname;
}

void moonix::system (const std::string cmd)
{
	int exit_code = ::system(cmd.c_str());
	std::cout << "Exit code: " << exit_code << "\n";
}
