getrusage(2): zero out ru_nsignals field

The current value was both wrong (counting spawned kernel signals
rather than delivered user signals) and returned for the calling
process even if the request was for the process's children.
For now we are better off not populating this field at all.

Change-Id: I6c660be266b5746b7c3db57ae88fa7f872961ee2
This commit is contained in:
David van Moolenbroek 2015-09-27 15:00:19 +00:00
parent cd27b2627a
commit 0f8e20a12c
7 changed files with 0 additions and 14 deletions

View File

@ -1983,8 +1983,3 @@ void ser_dump_proc()
print_proc_recursive(pp);
}
}
void increase_proc_signals(struct proc *p)
{
p->p_signal_received++;
}

View File

@ -126,8 +126,6 @@ struct proc {
*/
struct { reg_t r1, r2, r3; } p_defer;
u64_t p_signal_received;
#if DEBUG_TRACE
int p_schedules;
#endif

View File

@ -83,7 +83,6 @@ int isokendpt_f(endpoint_t e, int *p, int f);
#endif
void proc_no_time(struct proc *p);
void reset_proc_accounting(struct proc *p);
void increase_proc_signals(struct proc *p);
void flag_account(struct proc *p, int flag);
int try_deliver_senda(struct proc *caller_ptr, asynmsg_t *table, size_t
size);

View File

@ -378,7 +378,6 @@ int send_sig(endpoint_t ep, int sig_nr)
priv = priv(rp);
if(!priv) return ENOENT;
sigaddset(&priv->s_sig_pending, sig_nr);
increase_proc_signals(rp);
mini_notify(proc_addr(SYSTEM), rp->p_endpoint);
return OK;
@ -443,7 +442,6 @@ int sig_nr; /* signal to be sent */
/* Check if the signal is already pending. Process it otherwise. */
if (!s) {
sigaddset(&rp->p_pending, sig_nr);
increase_proc_signals(rp);
if (! (RTS_ISSET(rp, RTS_SIGNALED))) { /* other pending */
RTS_SET(rp, RTS_SIGNALED | RTS_SIG_PENDING);
if(OK != send_sig(sig_mgr, SIGKSIG))

View File

@ -94,7 +94,6 @@ int do_fork(struct proc * caller, message * m_ptr)
rpc->p_cycles = 0;
rpc->p_kcall_cycles = 0;
rpc->p_kipc_cycles = 0;
rpc->p_signal_received = 0;
/* If the parent is a privileged process, take away the privileges from the
* child process and inhibit it from running by setting the NO_PRIV flag.

View File

@ -211,7 +211,6 @@ int do_getinfo(struct proc * caller, message * m_ptr)
usec = target->p_sys_time * 1000000 / system_hz;
r_usage.ru_stime.tv_sec = usec / 1000000;
r_usage.ru_stime.tv_usec = usec % 1000000;
r_usage.ru_nsignals = target->p_signal_received;
src_vir = (vir_bytes) &r_usage;
break;
}

View File

@ -1240,8 +1240,6 @@ pm_getrusage_in(struct trace_proc * proc, const message * m_out,
put_struct_timeval(proc, "ru_stime", PF_LOCADDR,
(vir_bytes)&buf.ru_stime);
if (verbose > 0)
put_value(proc, "ru_nsignals", "%ld", buf.ru_nsignals);
put_close_struct(proc, verbose > 0);
}
put_equals(proc);