_exit(1);
int SystemCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]){	char buf[BUFSIZ];	char *args[4];	char *cmdstring;	FILE *pdes;	int fdset[2], nullfd;	int ret;	pid_t pid;	if (objc != 2) {		Tcl_WrongNumArgs(interp, 1, objv, "command");		return TCL_ERROR;	}	cmdstring = Tcl_GetString(objv[1]);	if (pipe(fdset) == -1)		return TCL_ERROR;	/*	 * Fork a child to run the command, in a popen() like fashion -	 * popen() itself is not used because stderr is also desired.	 */	pid = fork();	if (pid == -1)		return TCL_ERROR;	if (pid == 0) {		close(fdset[0]);		if ((nullfd = open(_PATH_DEVNULL, O_RDONLY)) == -1)			return TCL_ERROR;		dup2(nullfd, STDIN_FILENO);		dup2(fdset[1], STDOUT_FILENO);		dup2(fdset[1], STDERR_FILENO);		/* XXX dropping the controlling terminal */		if (setsid() == -1)			_exit(1);		/* XXX ugly string constants */		args[0] = "sh";		args[1] = "-c";		args[2] = cmdstring;		args[3] = NULL;		execve("/bin/sh", args, NULL);	}	close(fdset[1]);	pdes = fdopen(fdset[0], "r");	/* read from simulated popen() pipe */	while (fgets(buf, BUFSIZ, pdes) != NULL) {		int ret = ui_info(interp, buf);		if (ret != TCL_OK)			return ret;	}	fclose(pdes);	wait(&ret);	if (ret == 0)		return TCL_OK;	else		return TCL_ERROR;}