1. A computer implemented method for a built-in function of a shell to execute in a thread of an interactive shell process, the method comprising: receiving a request to execute the built-in function; determining that the request includes a thread creating indicator; scheduling a thread to execute the built-in function, in response to a determination that the request includes the thread creating indicator, wherein the thread is controlled by the interactive shell process and shares an environment of the interactive shell process; declaring a variable based on at least one instruction of the built-in function; and accessing the variable, wherein the variable is in an environment controlled by the interactive shell process.