View | Details | Raw Unified | Return to bug 207386 | Differences between
and this patch

Collapse All | Expand All

(-)linprocfs.c (-5 / +6 lines)
Lines 1402-1416 Link Here
1402
{
1402
{
1403
	const struct limit_info	*li;
1403
	const struct limit_info	*li;
1404
	struct rlimit li_rlimits;
1404
	struct rlimit li_rlimits;
1405
	struct plimit *cur_proc_lim;
1405
	struct plimit *process_lim;
1406
1406
1407
	cur_proc_lim = lim_alloc();
1407
	PROC_LOCK(p);
1408
	lim_copy(cur_proc_lim, p->p_limit);
1408
	process_lim = lim_hold(p->p_limit);	
1409
	PROC_UNLOCK(p);
1409
	sbuf_printf(sb, "%-26s%-21s%-21s%-10s\n", "Limit", "Soft Limit",
1410
	sbuf_printf(sb, "%-26s%-21s%-21s%-10s\n", "Limit", "Soft Limit",
1410
			"Hard Limit", "Units");
1411
			"Hard Limit", "Units");
1411
	for (li = limits_info; li->desc != NULL; ++li) {
1412
	for (li = limits_info; li->desc != NULL; ++li) {
1412
		if (li->rlim_id != RLIM_INFINITY && li->rlim_id != RLIM_NONE)
1413
		if (li->rlim_id != RLIM_INFINITY && li->rlim_id != RLIM_NONE)
1413
			li_rlimits = cur_proc_lim->pl_rlimit[li->rlim_id];
1414
			li_rlimits = process_lim->pl_rlimit[li->rlim_id];
1414
		else {
1415
		else {
1415
			li_rlimits.rlim_cur = 0;
1416
			li_rlimits.rlim_cur = 0;
1416
			li_rlimits.rlim_max = 0;
1417
			li_rlimits.rlim_max = 0;
Lines 1424-1430 Link Here
1424
			    li->desc, (long)li_rlimits.rlim_cur,
1425
			    li->desc, (long)li_rlimits.rlim_cur,
1425
			    (long)li_rlimits.rlim_max, li->unit);
1426
			    (long)li_rlimits.rlim_max, li->unit);
1426
	}
1427
	}
1427
	lim_free(cur_proc_lim);
1428
	lim_free(process_lim);
1428
	return (0);
1429
	return (0);
1429
}
1430
}
1430
1431

Return to bug 207386