Esempio n. 1
0
int
_start (int m, int c, struct msgbuf *buf, int bufcnt)
{
	int idman_user_init (void *, char *, int);
	void *tmp;

	if (m != MSG_BUF)
		exitprocess (1);
	printf ("idman (user) init\n");
	usleep_desc = msgopen ("usleep");
	if (usleep_desc < 0) {
		printf ("open usleep failed\n");
		exitprocess (1);
	}
	tmp = alloc (buf[0].len);
	memcpy (tmp, buf[0].base, buf[0].len);
	if (idman_user_init (tmp, buf[1].base, buf[1].len)) {
		printf ("idman init failed\n");
		exitprocess (1);
	}
	if (restrict (16384, 8 * 16384)) {
		printf ("idman restrict failed\n");
		exitprocess (1);
	}
	printf ("ready\n");
	return 0;
}
Esempio n. 2
0
int
_start (int m, int c, struct msgbuf *buf, int bufcnt)
{
	void vpn_user_init (void *, char *, int);

	if (m != MSG_BUF)
		exitprocess (1);
	printf ("vpn (user) init\n");
	vpn_user_init (buf[0].base, buf[1].base, buf[1].len);
	if (restrict (16384, 8 * 16384)) { /* stack must be aligned to 16KiB */
		printf ("vpn restrict failed\n");
		exitprocess (1);
	}
	return 0;
}
//------------------------------------------------------------------------------
void process::terminate()
{
   #if beast_msvc && beast_check_memory_leaks
    _crtdumpmemoryleaks();
   #endif

    // bullet in the head in case there's a problem shutting down..
    exitprocess (0);
}
Esempio n. 4
0
int
_start (int a1, int a2)
{
	char buf[100];

	for (;;) {
		printf ("sendexample> ");
		lineinput (buf, 100);
		switch (buf[0]) {
		case 'h':
			print_help (buf);
			break;
		case 's':
			sendex (buf);
			break;
		case 'q':
			exitprocess (0);
			break;
		default:
			command_error ();
			break;
		}
	}
}