Blame gnulib-tests/test-sys_resource.c
|
Packit Service |
2723c6 |
/* Test of <sys/resource.h> substitute.
|
|
Packit Service |
2723c6 |
Copyright (C) 2012-2018 Free Software Foundation, Inc.
|
|
Packit Service |
2723c6 |
|
|
Packit Service |
2723c6 |
This program is free software: you can redistribute it and/or modify
|
|
Packit Service |
2723c6 |
it under the terms of the GNU General Public License as published by
|
|
Packit Service |
2723c6 |
the Free Software Foundation; either version 3 of the License, or
|
|
Packit Service |
2723c6 |
(at your option) any later version.
|
|
Packit Service |
2723c6 |
|
|
Packit Service |
2723c6 |
This program is distributed in the hope that it will be useful,
|
|
Packit Service |
2723c6 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit Service |
2723c6 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
Packit Service |
2723c6 |
GNU General Public License for more details.
|
|
Packit Service |
2723c6 |
|
|
Packit Service |
2723c6 |
You should have received a copy of the GNU General Public License
|
|
Packit Service |
2723c6 |
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
|
Packit Service |
2723c6 |
|
|
Packit Service |
2723c6 |
#include <config.h>
|
|
Packit Service |
2723c6 |
|
|
Packit Service |
2723c6 |
#include <sys/resource.h>
|
|
Packit Service |
2723c6 |
|
|
Packit Service |
2723c6 |
/* Check that necessary types are defined. */
|
|
Packit Service |
2723c6 |
#ifdef TODO /* Not implemented in gnulib yet */
|
|
Packit Service |
2723c6 |
rlim_t t1;
|
|
Packit Service |
2723c6 |
struct rlimit t2;
|
|
Packit Service |
2723c6 |
#endif
|
|
Packit Service |
2723c6 |
struct rusage t3;
|
|
Packit Service |
2723c6 |
#ifdef TODO
|
|
Packit Service |
2723c6 |
struct timeval t4;
|
|
Packit Service |
2723c6 |
id_t t5;
|
|
Packit Service |
2723c6 |
time_t t10;
|
|
Packit Service |
2723c6 |
suseconds_t t11;
|
|
Packit Service |
2723c6 |
fd_set t12;
|
|
Packit Service |
2723c6 |
#endif
|
|
Packit Service |
2723c6 |
|
|
Packit Service |
2723c6 |
/* Check that the necessary constants are defined. */
|
|
Packit Service |
2723c6 |
#ifdef TODO /* Not implemented in gnulib yet */
|
|
Packit Service |
2723c6 |
int prios[] =
|
|
Packit Service |
2723c6 |
{
|
|
Packit Service |
2723c6 |
PRIO_PROCESS,
|
|
Packit Service |
2723c6 |
PRIO_PGRP,
|
|
Packit Service |
2723c6 |
PRIO_USER
|
|
Packit Service |
2723c6 |
};
|
|
Packit Service |
2723c6 |
int rlims[] =
|
|
Packit Service |
2723c6 |
{
|
|
Packit Service |
2723c6 |
RLIM_INFINITY,
|
|
Packit Service |
2723c6 |
RLIM_SAVED_MAX,
|
|
Packit Service |
2723c6 |
RLIM_SAVED_CUR
|
|
Packit Service |
2723c6 |
};
|
|
Packit Service |
2723c6 |
#endif
|
|
Packit Service |
2723c6 |
int rusages[] =
|
|
Packit Service |
2723c6 |
{
|
|
Packit Service |
2723c6 |
RUSAGE_SELF,
|
|
Packit Service |
2723c6 |
RUSAGE_CHILDREN
|
|
Packit Service |
2723c6 |
};
|
|
Packit Service |
2723c6 |
#ifdef TODO
|
|
Packit Service |
2723c6 |
int rlimits[] =
|
|
Packit Service |
2723c6 |
{
|
|
Packit Service |
2723c6 |
RLIMIT_CORE,
|
|
Packit Service |
2723c6 |
RLIMIT_CPU,
|
|
Packit Service |
2723c6 |
RLIMIT_DATA,
|
|
Packit Service |
2723c6 |
RLIMIT_FSIZE,
|
|
Packit Service |
2723c6 |
RLIMIT_NOFILE,
|
|
Packit Service |
2723c6 |
RLIMIT_STACK,
|
|
Packit Service |
2723c6 |
RLIMIT_AS
|
|
Packit Service |
2723c6 |
};
|
|
Packit Service |
2723c6 |
#endif
|
|
Packit Service |
2723c6 |
|
|
Packit Service |
2723c6 |
int
|
|
Packit Service |
2723c6 |
main (void)
|
|
Packit Service |
2723c6 |
{
|
|
Packit Service |
2723c6 |
return 0;
|
|
Packit Service |
2723c6 |
}
|