int status = 0;
tUserInfo *uinfo;
+ printf("\x1B[2J"); // Clear Screen
+
for(;;)
{
- printf("\x1B[2J"); // Clear Screen
// Validate User
for(;;)
{
return -1;
}
+ printf("pid = %i\n", pid);
+
// Spawn shell in a child process
if(pid == 0)
{
while( (ch = fgetc(stdin)) != -1 && ch != '\n' )
{
if(ch == '\b') {
- if( pos == 0 ) continue;
+ if( pos <= 0 ) continue;
pos --;
ret[pos] = '\0';
}
while( (ch = fgetc(stdin)) != -1 && ch != '\n' )
{
if(ch == '\b') {
- if( pos == 0 ) continue;
+ if( pos <= 0 ) continue;
pos --;
ret[pos] = '\0';
}