10. Running your Program

Once you have created the file with the permissions, you can execute your program. For that, you'll need to give the following command as root:

# service run /home/lcom/lab2/lab2 [-args "<list of space separated args>"]

Where we assume that you are using the code in lab2.c, and therefore the characters [ and ], delimit optional input. If this part is absent, lab2 will display information on usage of the program. If present, the <list of space separated args> will be handled as the list of command line arguments of a standard user program and passed as command line arguments to your program. In future labs, this feature will be graded, and you should use it for testing, not only to score some points.

If the directory where you run service is /home/lcom/lab2 you can avoid typing it, by giving the following command instead:

# service run `pwd`/lab2 [-args "<list of space separated args>"]