Print this page
OS-3280 need a way to specify the root of a native system in the lx brand
OS-3279 lx brand should allow delegated datasets
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
*** 22,33 ****
/*
* Copyright 2003 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
- #pragma ident "%Z%%M% %I% %E% SMI"
-
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <ctype.h>
--- 22,31 ----
*** 35,44 ****
--- 33,44 ----
#include <signal.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <libproc.h>
+ #include <limits.h>
+ #include "ptools_common.h"
#define NOREAP_TIME 60 /* wait 60 seconds before allow a reap */
static volatile int interrupt;
static int Fflag;
*** 51,65 ****
}
static int
open_usage(pid_t pid, int *perr)
{
! char path[64];
struct stat64 st;
int fd;
! (void) snprintf(path, sizeof (path), "/proc/%d/usage", (int)pid);
/*
* Attempt to open the usage file, and return the fd if we can
* confirm this is a regular file provided by /proc.
*/
--- 51,65 ----
}
static int
open_usage(pid_t pid, int *perr)
{
! char path[PATH_MAX];
struct stat64 st;
int fd;
! (void) proc_snprintf(path, sizeof (path), "/proc/%d/usage", (int)pid);
/*
* Attempt to open the usage file, and return the fd if we can
* confirm this is a regular file provided by /proc.
*/