I'm busy coding a simple terminal in C on Minix 3.1. Simple commands such as touch a.txt
or date
is working perfectly. But when I make a directory such as mkdir test
it creates a directory called USER=root
and when I try create another one it says USER=root: already exists
. I am logged in as the root. I am using execvp() in C to execute the terminal commands.
ls
gives me this:
(null): HOME=/root: No such file or directory
(null): PAGER=more: No such file or directory
(null): LOGNAME=root: No such file or directory
(null): TERM=minix: No such file or directory
(null): PATH=/root/bin:/usr/local/bin:/vin:/usr/bin: No such file or directory
(null): SHELL=/bin/sh: No such file or directory
(null): TZ=GMT0: No such file or directory
(null): EDITOR=vi: No such file or directory
USER=root:
Does anyone know what this actually means and how I can fix this. I have tried everything I could think of in my code to try fix this problem but nothing has worked.
Im calling executeCommand
from another function which just returns the status to loopShell