Commit b46c2ad2 authored by Wilke Pierre's avatar Wilke Pierre
Browse files

Testeur

parent 14ea59af
......@@ -190,6 +190,12 @@ docker-qemu:
docker-qemu-gdb:
docker run --rm --user $(shell id -u):$(shell id -g) --name os-container -p 26000-26003:26000-26003 -v "$(shell pwd)":/data -it pwilke/os-infosec make qemu-gdb ${MAKEFLAGS}
ifndef ACT
ACT := default
endif
eval:
./run_docker.sh $(ACT)
##
## FOR submitting lab solutions
##
......
#!/bin/bash
docker run --rm --user $(id -u):$(id -g) --name os-container -v $(pwd):/data -it pwilke/oscorrector $@
......@@ -147,6 +147,7 @@ main(int argc, char* argv[])
{
static char buf[100];
int fd;
int lastretval = 0;
if (argc < 2){
printf("expected one argument, got argc=%d\n", argc);
......@@ -170,9 +171,13 @@ main(int argc, char* argv[])
fprintf(2, "cannot cd %s\n", buf+3);
continue;
}
if(buf[0] == 'r' && buf[1] == 'v' && buf[2] == '\n'){
fprintf(2, "retval = %d\n", lastretval);
continue;
}
if(fork1() == 0)
runcmd(parsecmd(buf));
wait(0);
wait(&lastretval);
}
exit(0);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment