#ifdef UML_CONFIG_MODE_TT 
#ifdef UML_CONFIG_CMDLINE_ON_HOST 
int main(int argc, char **argv, char **envp){	char **new_argv;	sigset_t mask;	int ret, i, err;	/* Enable all signals except SIGIO - in some environments, we can	 * enter with some signals blocked	 */	sigemptyset(&mask);	sigaddset(&mask, SIGIO);	if(sigprocmask(SIG_SETMASK, &mask, NULL) < 0){		perror("sigprocmask");		exit(1);	}#ifdef UML_CONFIG_MODE_TT	/* Allocate memory for thread command lines */	if(argc < 2 || strlen(argv[1]) < THREAD_NAME_LEN - 1){		char padding[THREAD_NAME_LEN] = {			[ 0 ...  THREAD_NAME_LEN - 2] = ' ', '\0'		};		new_argv = malloc((argc + 2) * sizeof(char*));		if(!new_argv) {			perror("Allocating extended argv");			exit(1);		}		new_argv[0] = argv[0];		new_argv[1] = padding;		for(i = 2; i <= argc; i++)			new_argv[i] = argv[i - 1];		new_argv[argc + 1] = NULL;		execvp(new_argv[0], new_argv);		perror("execing with extended args");		exit(1);	}#endif	linux_prog = argv[0];	set_stklim();	new_argv = malloc((argc + 1) * sizeof(char *));	if(new_argv == NULL){		perror("Mallocing argv");		exit(1);	}	for(i=0;i<argc;i++){		new_argv[i] = strdup(argv[i]);		if(new_argv[i] == NULL){			perror("Mallocing an arg");			exit(1);		}	}	new_argv[argc] = NULL;	set_handler(SIGINT, last_ditch_exit, SA_ONESHOT | SA_NODEFER, -1);	set_handler(SIGTERM, last_ditch_exit, SA_ONESHOT | SA_NODEFER, -1);	set_handler(SIGHUP, last_ditch_exit, SA_ONESHOT | SA_NODEFER, -1);	scan_elf_aux( envp);	do_uml_initcalls();	ret = linux_main(argc, argv);	/* Disable SIGPROF - I have no idea why libc doesn't do this or turn	 * off the profiling time, but UML dies with a SIGPROF just before	 * exiting when profiling is active.	 */	change_sig(SIGPROF, 0);        /* This signal stuff used to be in the reboot case.  However,         * sometimes a SIGVTALRM can come in when we're halting (reproducably         * when writing out gcov information, presumably because that takes         * some time) and cause a segfault.         */        /* stop timers and set SIG*ALRM to be ignored */        disable_timer();        /* disable SIGIO for the fds and set SIGIO to be ignored */        err = deactivate_all_fds();        if(err)                printf("deactivate_all_fds failed, errno = %d\n", -err);        /* Let any pending signals fire now.  This ensures         * that they won't be delivered after the exec, when         * they are definitely not expected.         */        unblock_signals();	/* Reboot */	if(ret){		printf("\n");		execvp(new_argv[0], new_argv);		perror("Failed to exec kernel");		ret = 1;	}	printf("\n");	return(uml_exitcode);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/0221575903ad68debea57679b5b46575bf57afb1/main.c/clean/arch/um/kernel/main.c