X-Git-Url: https://git.ucc.asn.au/?p=progcomp2012.git;a=blobdiff_plain;f=manager%2Fprogram.cpp;h=acf501e25b94e5f07b0142515897ee2d619629c0;hp=8b4e4afcdf6072bcc2c9825d83198fd3f7ddbd24;hb=b563784f7e8b559fc100e174331c99fc6a1beda8;hpb=2ab27eb698cfd57977cc9cc25edcbfbeb3b1b1ee diff --git a/manager/program.cpp b/manager/program.cpp index 8b4e4af..acf501e 100644 --- a/manager/program.cpp +++ b/manager/program.cpp @@ -72,7 +72,7 @@ Program::~Program() if (kill(pid, 0) == 0) //Check if the process created is still running... { fputc(EOF, output); //If it was, tell it to stop with EOF - sleep(1); //Give it 1 second to respond... + usleep(500000); //Give it 1/2 a second to respond... if (kill(pid, 0) == 0) //Check if its still running { kill(pid, 9); //Slay the infidel mercilessly!