lib/syscall_all.c
int sys_env_destroy(int sysno, u_int envid)
{
	/*
		printf("[%08x] exiting gracefully\n", curenv->env_id);
		env_destroy(curenv);
	*/
	int r;
	struct Env *e;

	if ((r = envid2env(envid, &e, 1)) < 0) {
		return r;
	}

	//printf("[%08x] destroying %08x\n", curenv->env_id, e->env_id);
	env_destroy(e);
    printf("after destroy...\n");
	return 0;
}
/* Overview:
 * 	This function is used to destroy the current environment.
 *
 * Pre-Condition:
 * 	The parameter `envid` must be the environment id of a 
 * process, which is either a child of the caller of this function 
 * or the caller itself.
 *
 * Post-Condition:
 * 	Return 0 on success, < 0 when error occurs.
 */
This function is used to destroy the current environment.

Pre-Condition:
The parameter `envid` must be the environment id of a
process, which is either a child of the caller of this function
or the caller itself.

Post-Condition:
Return 0 on success, < 0 when error occurs.
This function is used to destroy the current environment . Pre - Condition : The parameter ` envid ` must be the environment id of a process which is either a child of the caller of this function or the caller itself . Post - Condition : Return 0 on success < 0 when error occurs .
int sys_env_destroy(int sysno, u_int envid)
{
	int r;
	struct Env *e;
	if ((r = envid2env(envid, &e, 1)) < 0) {
		return r;
	}
	env_destroy(e);
    printf("after destroy...\n");
	return 0;
}
int sys_env_destroy ( int sysno , u_int envid ) { int r ; struct Env * e ; if ( ( r = envid2env ( envid , & e , 1 ) ) < 0 ) { return r ; } env_destroy ( e ) ; printf ( " \n " ) ; return 0 ; }
Overview:
      This function is used to destroy the current environment.
Overview : This function is used to destroy the current environment .
/*
		printf("[%08x] exiting gracefully\n", curenv->env_id);
		env_destroy(curenv);
	*/ //printf("[%08x] destroying %08x\n", curenv->env_id, e->env_id);