⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 exec.c

📁 一个Windows下的Linux专用虚拟机
💻 C
字号:
/* * This source code is a part of coLinux source package. * * Dan Aloni <da-x@colinux.org>, 2003 (c) * * The code is licensed under the GPL. See the COPYING file at * the root directory. * */ #include <stdio.h>#include <stdlib.h>#include <errno.h>#include <colinux/os/user/exec.h>#include <colinux/os/user/misc.h>co_rc_t co_launch_process(int *pid, char *command_line, ...){	char buf[0x100];	char buf2[0x100];	va_list ap;	int ret;		va_start(ap, command_line);	vsnprintf(buf, sizeof(buf), command_line, ap);	va_end(ap);	snprintf(buf2, sizeof(buf2), "%s &", buf);	co_debug("executing: %s", buf2);	ret = system(buf2);	if (ret == -1) {		co_terminal_print("error in execution '%s' (%d)\n", buf2, errno);		return CO_RC(ERROR);	}	if (pid)		*pid = 0; /* dummy */	return CO_RC(OK);}co_rc_t co_kill_process(int pid){	return CO_RC(OK);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -