Roxen.git / server / config_actions / proc.pike

version» Context lines:

Roxen.git/server/config_actions/proc.pike:1:   /* -  * $Id: proc.pike,v 1.5 1997/09/06 17:10:26 noring Exp $ +  * $Id: proc.pike,v 1.6 1997/09/10 12:36:17 grubba 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()
Roxen.git/server/config_actions/proc.pike:82:   }      string cred(object id)   {    string r = "", s;    int uid, gid;    if(sscanf(proc("cred",id->variables->pid), "%*d:\te/r/suid=%d "    "e/r/sgid=%d\n\tgroups:%s\n", uid, gid, s) != 4)    return "-<br>";    array groups = ((s||"")/" ") - ({ "" }); + #if constant(getgrgid)    for(int i = 0; i < sizeof(groups); i++)    groups[i] = getgrgid((int)groups[i])[0];    return sprintf("e/r/suid: %s<br>e/r/sgid: %s<br>groups: %O\n",    getpwuid(uid)[0], getgrgid(gid)[0],    String.implode_nicely(groups)); -  + #else +  return sprintf("e/r/suid: %s<br>e/r/sgid: %d<br>groups: %O\n", +  getpwuid(uid)[0], gid, +  String.implode_nicely(groups)); + #endif /* constant(getgrgid) */   }      mixed page_0(object id, object mc)   {    string map = proc("map -x",(int)id->variables->pid);    if(sscanf(map, "%*sShared%*s") != 2)    map = process_map(proc("map",(int)id->variables->pid));    else    map = process_map2(map);