Roxen.git / server / config_actions / proc.pike

version» Context lines:

Roxen.git/server/config_actions/proc.pike:1:   /* -  * $Id: proc.pike,v 1.9 1998/10/10 03:41:05 per Exp $ +  * $Id: proc.pike,v 1.10 1999/05/20 23:00:18 neotron Exp $    */      inherit "wizard";      constant name= "Status//Extended process status";   constant doc = "Shows detailed process status on Solaris 2.5 and 2.6.";      constant more=1;      void create()   {    if(!file_stat("/usr/proc/bin/")) {    throw("Only available under Solaris 2.5 and newer\n");    }   }      string proc(string prog, int pid )   {    if(!pid) pid=getpid(); -  object p = ((program)"privs")("Process status"); -  return popen("/usr/proc/bin/p"+prog+" "+pid); +  object p = Privs("Process status"); +  return Process.popen("/usr/proc/bin/p"+prog+" "+pid);   }      string process_map(string in)   {    string q="<table>";    mapping map = ([]);    foreach((in/"\n")[1..], string m)    {    string a,b;    while(sscanf(m, "%s: %s", a,b)==2) m=a+":"+b;