|
|
|
|
|
by nickofbh
4139 days ago
|
|
I'm a student in CS@Illinois and I took this class last semester. For assignment one, they gave us a library and the following where we had to make a working shell (sorry for formatting): / @file shell.c /
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
#include "log.h" log_t Log;
/**
* * Starting point for shell.
* */
int main(int argc, char ** argv) {
/**
* * Analyze command line arguments
* */
while(1)
{
/**
* * Print a command prompt
* */
/**
* * Read the commands
* */
/**
* * Print the PID of the process executing the command
* */
/**
* * Decide which actions to take based on the command (exit, run program, etc.)
* */
}
return 0;
}
The provided code is rather sparse (by design), but the University holds copyright on it. |
|
What you've posted doesn't look substantial enough to be copyrightable to me; the idea of writing a main containing a while loop is certainly not original to the university, and the comments would presumably not be present in this repo since they'd've been replaced by working code. I sure hope the university of Illinois doesn't own the copyright on any shell I write from now on, because that would be ridiculous.