builtin_ulimit.c File Reference

Functions defining the ulimit builtin. More...

#include "config.h"
#include <stdlib.h>
#include <stdio.h>
#include <wchar.h>
#include <wctype.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <unistd.h>
#include <errno.h>
#include "fallback.h"
#include "util.h"
#include "builtin.h"
#include "common.h"
#include "wgetopt.h"

This graph shows which files directly or indirectly include this file:

Data Structures

struct  resource_t
 Struct describing a resource limit. More...

Functions

static int get_multiplier (int what)
 Get the implicit multiplication factor for the specified resource limit.
static rlim_t get (int resource, int hard)
 Return the value for the specified resource limit.
static void print (int resource, int hard)
 Print the value of the specified resource limit.
static void print_all (int hard)
 Print values of all resource limits.
static const wchar_t * get_desc (int what)
 Returns the description for the specified resource limit.
static int set (int resource, int hard, int soft, rlim_t value)
 Set the new value of the specified resource limit.
static int builtin_ulimit (wchar_t **argv)
 The ulimit builtin, used for setting resource limits.

Variables

static const struct resource_t resource_arr []
 Array of resource_t structs, describing all known resource types.

Detailed Description

Functions defining the ulimit builtin.

Functions used for implementing the ulimit builtin.


Function Documentation

static int builtin_ulimit ( wchar_t **  argv  )  [static]

static rlim_t get ( int  resource,
int  hard 
) [static]

Return the value for the specified resource limit.

This function does _not_ multiply the limit value by the multiplier constant used by the commandline ulimit.

static int set ( int  resource,
int  hard,
int  soft,
rlim_t  value 
) [static]

Set the new value of the specified resource limit.

This function does _not_ multiply the limit value by the multiplier constant used by the commandline ulimit.

References builtin_wperror(), get_desc(), sb_err, and sb_printf().


Generated on Sun Mar 8 15:46:54 2009 for fish by  doxygen 1.5.6