pike.git / NT / tools / sprshd

version» Context lines:

pike.git/NT/tools/sprshd:1:   #!/usr/local/bin/pike + /* -*- Pike -*- */      inherit Stdio.Port;      #if !constant(Stdio.PROP_IPC)   #define NO_IPC   #endif      // Bugfix for some older versions of Pike..   string combine_path(string s, string ... rest)   {
pike.git/NT/tools/sprshd:266:    thread_create(monitor,p2,p);   #endif    while(1)    {    string s=pi->read(1000,1);    if(!s || !strlen(s)) break;    io->write(sprintf("%4c%s",strlen(s),s));    }       io->write(sprintf("%4c",0)); -  io->write(sprintf("%4c",p->wait())); +  int code; +  if (catch { code = p->wait(); }) { +  // wait() failed. +  io->write(sprintf("%4c", -1)); +  } else { +  io->write(sprintf("%4c", code)); +  }    }else{    werror("dir=%s\n",dir);    werror(master()->describe_backtrace(err));    destruct(p2);    io->write(sprintf("%4c",0));    io->write(sprintf("%4c",69));    }    }   #ifdef WINE    io->close("rw");