summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiklas Halle <niklas@niklashalle.net>2020-05-24 17:29:04 +0200
committerNiklas Halle <niklas@niklashalle.net>2020-05-24 17:29:04 +0200
commit76d8a735b54f528f1bef8d67207862bc6db493a4 (patch)
treec39d84bd0f4ecabb04cc568904959e84b35b70cb
parent922b46952d38f51850640a20d7be4747e84e95f4 (diff)
downloadbetriebssysteme-76d8a735b54f528f1bef8d67207862bc6db493a4.tar.gz
betriebssysteme-76d8a735b54f528f1bef8d67207862bc6db493a4.zip
small welcome message, telling what the shell can do
-rw-r--r--02_exercise/shell.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/02_exercise/shell.c b/02_exercise/shell.c
index 35de455..20156b2 100644
--- a/02_exercise/shell.c
+++ b/02_exercise/shell.c
@@ -13,6 +13,15 @@ int main(void) {
setvbuf(stderr, NULL, _IONBF, 0);
setvbuf(stdout, NULL, _IONBF, 0);
+ printf("Welcome! Available built-ins are:\n"
+ "cd: `cd <path>` - if no path is given, return to the current dir\n"
+ "wait: `wait pid1 ... pidN` - wait on the processes and report their exit conditions\n"
+ "fg: `fg pid` - pulls a process from the background back in the foreground (#TODO)\n"
+ "\n"
+ "You can put processes in the background using the unary `&` for new processes, and using CTRL-Z (#TODO) for already running ones\n"
+ "With `|` you can pipe the output from one process to the input of another\n"
+ );
+
char const *const original_wd = get_current_dir_name();
char const *prompt = relative_path(original_wd, original_wd);
bool done = false;