xv6-65oo2/user/kill.c
Frans Kaashoek 7e6c37e67e Support exit status for exit/wait
One test case for returning a exit status
Passes usertests, but haven't used it to simplify tests
2019-09-10 12:30:10 -04:00

18 lines
255 B
C

#include "kernel/types.h"
#include "kernel/stat.h"
#include "user/user.h"
int
main(int argc, char **argv)
{
int i;
if(argc < 2){
fprintf(2, "usage: kill pid...\n");
exit(-1);
}
for(i=1; i<argc; i++)
kill(atoi(argv[i]));
exit(0);
}