Link Search Menu Expand Document

Argument Passing

The process_execute function is used to create new user processes in Pintos. Currently, it does not support command-line arguments. You must implement argument passing such that the main function of the user process will receive the appropriate argc and argv. For instance, if you called process_execute("ls -ahl"), the user program would receive 2 as argc and ["ls", "-ahl"] as argv.

Many of our Pintos test programs start by printing out their own name (i.e. argv[0]). Since argument passing has not yet been implemented, all of these programs will crash when they access argv[0]. Until you implement argument passing, most test programs will not work.