Lines Matching refs:con

165 	Connection_t	con[1];		/* user connections		*/
170 Connection_t* con;
484 register Connection_t* con = state->con + fp->fd;
487 con->id = *id;
488 return con->fd = fp->fd;
739 Connection_t* con = ((Visit_t*)handle)->con;
753 error(ERROR_OUTPUT|0, con->fd, "%-3s %5lu %3d %3d %3d %3d %3d %2d.%02d %5.5s%s", que->name, que->total, que->pending, que->running, que->nproc, que->peruser, que->nice, que->load / 100, que->load % 100, fmtelapsed(que->wait, 1), s);
781 command(register State_t* state, Connection_t* con, register char* s, int n, char* data)
802 usr = user(state, NiL, con->id.uid);
819 error(ERROR_OUTPUT|2, con->fd, "%s: invalid queue name", t);
825 error(ERROR_OUTPUT|2, con->fd, "%s: unknown queue", t);
851 error(ERROR_OUTPUT|0, con->fd, "at service daemon pid %ld user %s", state->con[0].id.pid, fmtuid(state->admin[0]));
852 error(ERROR_OUTPUT|0, con->fd, "QUE TOTAL SUB RUN MAX USR PRI LOAD WAIT ACCESS");
854 visit.con = con;
867 error(ERROR_OUTPUT|2, con->fd, "%s: hog", own->user->name);
873 error(ERROR_OUTPUT|2, con->fd, "garbled job message");
880 error(ERROR_SYSTEM|ERROR_OUTPUT|2, con->fd, "out of space [job]");
888 sfsprintf(job->name, sizeof(job->name), "%..36lu.%..36lu.%..36lu", con->id.uid, con->id.gid, state->sequence++);
898 job->id = con->id;
1051 error(ERROR_OUTPUT|0, con->fd, "job %s at %s%s%s", job->name, fmttime("%a %b %e %T %Y", job->start), job->repeat ? " repeat " : "", job->period);
1064 if ((!que || que == job->queue) && (s && strmatch(job->name, s) || !s && (admin || con->id.uid == job->id.uid)) && job->owner->allow)
1068 error(ERROR_OUTPUT|0, con->fd, "%s\t%s", job->name, fmttime("%a %b %e %T %Y", job->start));
1072 error(ERROR_OUTPUT|0, con->fd, "JOB LABEL PID Q USER START REPEAT");
1073 error(ERROR_OUTPUT|0, con->fd, "%-21s %-*s%7d %-1s %.-8s %s %s", job->name, sizeof(job->label), job->label, job->pid, job->queue->name, job->owner->user->name, fmttime(AT_TIME_FORMAT, job->start), job->period);
1076 if (con->id.uid == job->id.uid || !con->id.uid)
1082 error(ERROR_OUTPUT|2, con->fd, "%s: only %s can remove this job", job->name, fmtuid(job->id.uid));
1088 error(ERROR_OUTPUT|0, con->fd, "%s: no matching jobs", s ? s : "*");
1097 error(ERROR_OUTPUT|0, con->fd, "%s", s);
1117 error(ERROR_OUTPUT|0, con->fd, "USER ADMIN TOTAL SUB RUN HOME");
1119 if (admin || con->id.uid == usr->uid)
1120 error(ERROR_OUTPUT|0, con->fd, "%-9.9s %5lu %5lu %3d %3d %s", usr->name, usr->admin, usr->total, usr->pending, usr->running, usr->home);
1123 error(ERROR_OUTPUT|0, con->fd, "%s", fmtident(id));
1126 error(ERROR_OUTPUT|2, con->fd, "%c: unknown command", *(s - 1));
1131 error(ERROR_OUTPUT|2, con->fd, "%s: access denied", usr->name);
1136 error(ERROR_SYSTEM|ERROR_OUTPUT|2, con->fd, "%s: cannot save action", job->name);
1140 error(ERROR_OUTPUT|2, con->fd, "%s: queue %s access denied", usr->name, que->name);
1277 register Connection_t* con = state->con + fp->fd;
1288 error(ERROR_OUTPUT|2, con->fd, "message size read error");
1294 error(ERROR_OUTPUT|2, con->fd, "invalid message size");
1301 error(ERROR_OUTPUT|2, con->fd, "%ld: message too big", n);
1309 error(ERROR_OUTPUT|2, con->fd, "message body read error");
1313 command(state, con, s, n, NiL);
1349 *ap++ = state->con[0].id.uid = geteuid();
1364 state->con[0].id.gid = getegid();
1365 state->con[0].id.pid = getpid();
1366 state->con[0].id.hid = csaddr(state->css->state, NiL);
1367 state->con[0].fd = 2;
1424 error(0, "daemon restart pid %ld user %s", state->con[0].id.pid, fmtuid(state->admin[0]));
1457 else if (sfsscanf(s, "%..36lu.%..36lu.%..36lu", &state->con[0].id.uid, &state->con[0].id.gid, &cs.time) != 3)
1475 command(state, state->con, b, sfvalue(sp), s);
1481 state->con[0].id.uid = geteuid();
1482 state->con[0].id.gid = getegid();