init
This commit is contained in:
parent
a9d6912991
commit
84b6bc4ee9
510
libcgroup-0.41/COPYING
Normal file
510
libcgroup-0.41/COPYING
Normal file
@ -0,0 +1,510 @@
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations
|
||||
below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it
|
||||
becomes a de-facto standard. To achieve this, non-free programs must
|
||||
be allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control
|
||||
compilation and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at least
|
||||
three years, to give the same user the materials specified in
|
||||
Subsection 6a, above, for a charge no more than the cost of
|
||||
performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply, and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License
|
||||
may add an explicit geographical distribution limitation excluding those
|
||||
countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms
|
||||
of the ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library.
|
||||
It is safest to attach them to the start of each source file to most
|
||||
effectively convey the exclusion of warranty; and each file should
|
||||
have at least the "copyright" line and a pointer to where the full
|
||||
notice is found.
|
||||
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or
|
||||
your school, if any, to sign a "copyright disclaimer" for the library,
|
||||
if necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James
|
||||
Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
|
||||
|
237
libcgroup-0.41/INSTALL
Normal file
237
libcgroup-0.41/INSTALL
Normal file
@ -0,0 +1,237 @@
|
||||
Installation Instructions
|
||||
*************************
|
||||
|
||||
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
|
||||
2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
This file is free documentation; the Free Software Foundation gives
|
||||
unlimited permission to copy, distribute and modify it.
|
||||
|
||||
Basic Installation
|
||||
==================
|
||||
|
||||
Briefly, the shell commands `./configure; make; make install' should
|
||||
configure, build, and install this package. The following
|
||||
more-detailed instructions are generic; see the `README' file for
|
||||
instructions specific to this package.
|
||||
|
||||
The `configure' shell script attempts to guess correct values for
|
||||
various system-dependent variables used during compilation. It uses
|
||||
those values to create a `Makefile' in each directory of the package.
|
||||
It may also create one or more `.h' files containing system-dependent
|
||||
definitions. Finally, it creates a shell script `config.status' that
|
||||
you can run in the future to recreate the current configuration, and a
|
||||
file `config.log' containing compiler output (useful mainly for
|
||||
debugging `configure').
|
||||
|
||||
It can also use an optional file (typically called `config.cache'
|
||||
and enabled with `--cache-file=config.cache' or simply `-C') that saves
|
||||
the results of its tests to speed up reconfiguring. Caching is
|
||||
disabled by default to prevent problems with accidental use of stale
|
||||
cache files.
|
||||
|
||||
If you need to do unusual things to compile the package, please try
|
||||
to figure out how `configure' could check whether to do them, and mail
|
||||
diffs or instructions to the address given in the `README' so they can
|
||||
be considered for the next release. If you are using the cache, and at
|
||||
some point `config.cache' contains results you don't want to keep, you
|
||||
may remove or edit it.
|
||||
|
||||
The file `configure.ac' (or `configure.in') is used to create
|
||||
`configure' by a program called `autoconf'. You need `configure.ac' if
|
||||
you want to change it or regenerate `configure' using a newer version
|
||||
of `autoconf'.
|
||||
|
||||
The simplest way to compile this package is:
|
||||
|
||||
1. `cd' to the directory containing the package's source code and type
|
||||
`./configure' to configure the package for your system.
|
||||
|
||||
Running `configure' might take a while. While running, it prints
|
||||
some messages telling which features it is checking for.
|
||||
|
||||
2. Type `make' to compile the package.
|
||||
|
||||
3. Optionally, type `make check' to run any self-tests that come with
|
||||
the package.
|
||||
|
||||
4. Type `make install' to install the programs and any data files and
|
||||
documentation.
|
||||
|
||||
5. You can remove the program binaries and object files from the
|
||||
source code directory by typing `make clean'. To also remove the
|
||||
files that `configure' created (so you can compile the package for
|
||||
a different kind of computer), type `make distclean'. There is
|
||||
also a `make maintainer-clean' target, but that is intended mainly
|
||||
for the package's developers. If you use it, you may have to get
|
||||
all sorts of other programs in order to regenerate files that came
|
||||
with the distribution.
|
||||
|
||||
6. Often, you can also type `make uninstall' to remove the installed
|
||||
files again.
|
||||
|
||||
Compilers and Options
|
||||
=====================
|
||||
|
||||
Some systems require unusual options for compilation or linking that the
|
||||
`configure' script does not know about. Run `./configure --help' for
|
||||
details on some of the pertinent environment variables.
|
||||
|
||||
You can give `configure' initial values for configuration parameters
|
||||
by setting variables in the command line or in the environment. Here
|
||||
is an example:
|
||||
|
||||
./configure CC=c99 CFLAGS=-g LIBS=-lposix
|
||||
|
||||
*Note Defining Variables::, for more details.
|
||||
|
||||
Compiling For Multiple Architectures
|
||||
====================================
|
||||
|
||||
You can compile the package for more than one kind of computer at the
|
||||
same time, by placing the object files for each architecture in their
|
||||
own directory. To do this, you can use GNU `make'. `cd' to the
|
||||
directory where you want the object files and executables to go and run
|
||||
the `configure' script. `configure' automatically checks for the
|
||||
source code in the directory that `configure' is in and in `..'.
|
||||
|
||||
With a non-GNU `make', it is safer to compile the package for one
|
||||
architecture at a time in the source code directory. After you have
|
||||
installed the package for one architecture, use `make distclean' before
|
||||
reconfiguring for another architecture.
|
||||
|
||||
Installation Names
|
||||
==================
|
||||
|
||||
By default, `make install' installs the package's commands under
|
||||
`/usr/local/bin', include files under `/usr/local/include', etc. You
|
||||
can specify an installation prefix other than `/usr/local' by giving
|
||||
`configure' the option `--prefix=PREFIX'.
|
||||
|
||||
You can specify separate installation prefixes for
|
||||
architecture-specific files and architecture-independent files. If you
|
||||
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
|
||||
PREFIX as the prefix for installing programs and libraries.
|
||||
Documentation and other data files still use the regular prefix.
|
||||
|
||||
In addition, if you use an unusual directory layout you can give
|
||||
options like `--bindir=DIR' to specify different values for particular
|
||||
kinds of files. Run `configure --help' for a list of the directories
|
||||
you can set and what kinds of files go in them.
|
||||
|
||||
If the package supports it, you can cause programs to be installed
|
||||
with an extra prefix or suffix on their names by giving `configure' the
|
||||
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||
|
||||
Optional Features
|
||||
=================
|
||||
|
||||
Some packages pay attention to `--enable-FEATURE' options to
|
||||
`configure', where FEATURE indicates an optional part of the package.
|
||||
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||
is something like `gnu-as' or `x' (for the X Window System). The
|
||||
`README' should mention any `--enable-' and `--with-' options that the
|
||||
package recognizes.
|
||||
|
||||
For packages that use the X Window System, `configure' can usually
|
||||
find the X include and library files automatically, but if it doesn't,
|
||||
you can use the `configure' options `--x-includes=DIR' and
|
||||
`--x-libraries=DIR' to specify their locations.
|
||||
|
||||
Specifying the System Type
|
||||
==========================
|
||||
|
||||
There may be some features `configure' cannot figure out automatically,
|
||||
but needs to determine by the type of machine the package will run on.
|
||||
Usually, assuming the package is built to be run on the _same_
|
||||
architectures, `configure' can figure that out, but if it prints a
|
||||
message saying it cannot guess the machine type, give it the
|
||||
`--build=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as `sun4', or a canonical name which has the form:
|
||||
|
||||
CPU-COMPANY-SYSTEM
|
||||
|
||||
where SYSTEM can have one of these forms:
|
||||
|
||||
OS KERNEL-OS
|
||||
|
||||
See the file `config.sub' for the possible values of each field. If
|
||||
`config.sub' isn't included in this package, then this package doesn't
|
||||
need to know the machine type.
|
||||
|
||||
If you are _building_ compiler tools for cross-compiling, you should
|
||||
use the option `--target=TYPE' to select the type of system they will
|
||||
produce code for.
|
||||
|
||||
If you want to _use_ a cross compiler, that generates code for a
|
||||
platform different from the build platform, you should specify the
|
||||
"host" platform (i.e., that on which the generated programs will
|
||||
eventually be run) with `--host=TYPE'.
|
||||
|
||||
Sharing Defaults
|
||||
================
|
||||
|
||||
If you want to set default values for `configure' scripts to share, you
|
||||
can create a site shell script called `config.site' that gives default
|
||||
values for variables like `CC', `cache_file', and `prefix'.
|
||||
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||
`CONFIG_SITE' environment variable to the location of the site script.
|
||||
A warning: not all `configure' scripts look for a site script.
|
||||
|
||||
Defining Variables
|
||||
==================
|
||||
|
||||
Variables not defined in a site shell script can be set in the
|
||||
environment passed to `configure'. However, some packages may run
|
||||
configure again during the build, and the customized values of these
|
||||
variables may be lost. In order to avoid this problem, you should set
|
||||
them in the `configure' command line, using `VAR=value'. For example:
|
||||
|
||||
./configure CC=/usr/local2/bin/gcc
|
||||
|
||||
causes the specified `gcc' to be used as the C compiler (unless it is
|
||||
overridden in the site shell script).
|
||||
|
||||
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
|
||||
an Autoconf bug. Until the bug is fixed you can use this workaround:
|
||||
|
||||
CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
|
||||
|
||||
`configure' Invocation
|
||||
======================
|
||||
|
||||
`configure' recognizes the following options to control how it operates.
|
||||
|
||||
`--help'
|
||||
`-h'
|
||||
Print a summary of the options to `configure', and exit.
|
||||
|
||||
`--version'
|
||||
`-V'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
|
||||
`--cache-file=FILE'
|
||||
Enable the cache: use and save the results of the tests in FILE,
|
||||
traditionally `config.cache'. FILE defaults to `/dev/null' to
|
||||
disable caching.
|
||||
|
||||
`--config-cache'
|
||||
`-C'
|
||||
Alias for `--cache-file=config.cache'.
|
||||
|
||||
`--quiet'
|
||||
`--silent'
|
||||
`-q'
|
||||
Do not print messages saying which checks are being made. To
|
||||
suppress all normal output, redirect it to `/dev/null' (any error
|
||||
messages will still be shown).
|
||||
|
||||
`--srcdir=DIR'
|
||||
Look for the package's source code in directory DIR. Usually
|
||||
`configure' can determine that directory automatically.
|
||||
|
||||
`configure' also accepts some other, not widely useful, options. Run
|
||||
`configure --help' for more details.
|
||||
|
7
libcgroup-0.41/Makefile.am
Normal file
7
libcgroup-0.41/Makefile.am
Normal file
@ -0,0 +1,7 @@
|
||||
AUTOMAKE_OPTIONS = foreign
|
||||
SUBDIRS = dist doc include samples scripts src tests
|
||||
|
||||
EXTRA_DIST = README_daemon libcgroup.doxyfile README_systemd
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = libcgroup.pc
|
867
libcgroup-0.41/Makefile.in
Normal file
867
libcgroup-0.41/Makefile.in
Normal file
@ -0,0 +1,867 @@
|
||||
# Makefile.in generated by automake 1.13.4 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
VPATH = @srcdir@
|
||||
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = .
|
||||
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
|
||||
$(top_srcdir)/configure $(am__configure_deps) \
|
||||
$(srcdir)/config.h.in $(top_srcdir)/scripts/init.d/cgconfig.in \
|
||||
$(top_srcdir)/scripts/init.d/cgred.in \
|
||||
$(srcdir)/libcgroup.pc.in COPYING INSTALL README config.guess \
|
||||
config.sub install-sh missing ltmain.sh
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||
configure.lineno config.status.lineno
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = config.h
|
||||
CONFIG_CLEAN_FILES = scripts/init.d/cgconfig scripts/init.d/cgred \
|
||||
libcgroup.pc
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
|
||||
ctags-recursive dvi-recursive html-recursive info-recursive \
|
||||
install-data-recursive install-dvi-recursive \
|
||||
install-exec-recursive install-html-recursive \
|
||||
install-info-recursive install-pdf-recursive \
|
||||
install-ps-recursive install-recursive installcheck-recursive \
|
||||
installdirs-recursive pdf-recursive ps-recursive \
|
||||
tags-recursive uninstall-recursive
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||
am__install_max = 40
|
||||
am__nobase_strip_setup = \
|
||||
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||
am__nobase_strip = \
|
||||
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||
am__nobase_list = $(am__nobase_strip_setup); \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||
if (++n[$$2] == $(am__install_max)) \
|
||||
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||
END { for (dir in files) print dir, files[dir] }'
|
||||
am__base_list = \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||
am__uninstall_files_from_dir = { \
|
||||
test -z "$$files" \
|
||||
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|
||||
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
|
||||
$(am__cd) "$$dir" && rm -f $$files; }; \
|
||||
}
|
||||
am__installdirs = "$(DESTDIR)$(pkgconfigdir)"
|
||||
DATA = $(pkgconfig_DATA)
|
||||
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
|
||||
distclean-recursive maintainer-clean-recursive
|
||||
am__recursive_targets = \
|
||||
$(RECURSIVE_TARGETS) \
|
||||
$(RECURSIVE_CLEAN_TARGETS) \
|
||||
$(am__extra_recursive_targets)
|
||||
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
|
||||
cscope distdir dist dist-all distcheck
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
|
||||
$(LISP)config.h.in
|
||||
# Read a list of newline-separated strings from the standard input,
|
||||
# and print each of them once, without duplicates. Input order is
|
||||
# *not* preserved.
|
||||
am__uniquify_input = $(AWK) '\
|
||||
BEGIN { nonempty = 0; } \
|
||||
{ items[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in items) print i; }; } \
|
||||
'
|
||||
# Make sure the list of sources is unique. This is necessary because,
|
||||
# e.g., the same source file might be shared among _SOURCES variables
|
||||
# for different programs/libraries.
|
||||
am__define_uniq_tagged_files = \
|
||||
list='$(am__tagged_files)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | $(am__uniquify_input)`
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
CSCOPE = cscope
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
am__remove_distdir = \
|
||||
if test -d "$(distdir)"; then \
|
||||
find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
|
||||
&& rm -rf "$(distdir)" \
|
||||
|| { sleep 5 && rm -rf "$(distdir)"; }; \
|
||||
else :; fi
|
||||
am__post_remove_distdir = $(am__remove_distdir)
|
||||
am__relativize = \
|
||||
dir0=`pwd`; \
|
||||
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
|
||||
sed_rest='s,^[^/]*/*,,'; \
|
||||
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
|
||||
sed_butlast='s,/*[^/]*$$,,'; \
|
||||
while test -n "$$dir1"; do \
|
||||
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
|
||||
if test "$$first" != "."; then \
|
||||
if test "$$first" = ".."; then \
|
||||
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
|
||||
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
|
||||
else \
|
||||
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
|
||||
if test "$$first2" = "$$first"; then \
|
||||
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
|
||||
else \
|
||||
dir2="../$$dir2"; \
|
||||
fi; \
|
||||
dir0="$$dir0"/"$$first"; \
|
||||
fi; \
|
||||
fi; \
|
||||
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
|
||||
done; \
|
||||
reldir="$$dir2"
|
||||
DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
|
||||
GZIP_ENV = --best
|
||||
DIST_TARGETS = dist-bzip2 dist-gzip
|
||||
distuninstallcheck_listfiles = find . -type f -print
|
||||
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
|
||||
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
|
||||
distcleancheck_listfiles = find . -type f -print
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
FGREP = @FGREP@
|
||||
GREP = @GREP@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LEX = @LEX@
|
||||
LEXLIB = @LEXLIB@
|
||||
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBRARY_VERSION_MAJOR = @LIBRARY_VERSION_MAJOR@
|
||||
LIBRARY_VERSION_MINOR = @LIBRARY_VERSION_MINOR@
|
||||
LIBRARY_VERSION_RELEASE = @LIBRARY_VERSION_RELEASE@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
REALLY_YACC = @REALLY_YACC@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
YACC = @YACC@
|
||||
YFLAGS = @YFLAGS@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pamlibdir = @pamlibdir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
AUTOMAKE_OPTIONS = foreign
|
||||
SUBDIRS = dist doc include samples scripts src tests
|
||||
EXTRA_DIST = README_daemon libcgroup.doxyfile README_systemd
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = libcgroup.pc
|
||||
all: config.h
|
||||
$(MAKE) $(AM_MAKEFLAGS) all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
am--refresh: Makefile
|
||||
@:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
|
||||
$(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
echo ' $(SHELL) ./config.status'; \
|
||||
$(SHELL) ./config.status;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
$(SHELL) ./config.status --recheck
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
$(am__cd) $(srcdir) && $(AUTOCONF)
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
config.h: stamp-h1
|
||||
@if test ! -f $@; then rm -f stamp-h1; else :; fi
|
||||
@if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
|
||||
|
||||
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
|
||||
@rm -f stamp-h1
|
||||
cd $(top_builddir) && $(SHELL) ./config.status config.h
|
||||
$(srcdir)/config.h.in: $(am__configure_deps)
|
||||
($(am__cd) $(top_srcdir) && $(AUTOHEADER))
|
||||
rm -f stamp-h1
|
||||
touch $@
|
||||
|
||||
distclean-hdr:
|
||||
-rm -f config.h stamp-h1
|
||||
scripts/init.d/cgconfig: $(top_builddir)/config.status $(top_srcdir)/scripts/init.d/cgconfig.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@
|
||||
scripts/init.d/cgred: $(top_builddir)/config.status $(top_srcdir)/scripts/init.d/cgred.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@
|
||||
libcgroup.pc: $(top_builddir)/config.status $(srcdir)/libcgroup.pc.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool config.lt
|
||||
install-pkgconfigDATA: $(pkgconfig_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
|
||||
if test -n "$$list"; then \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \
|
||||
fi; \
|
||||
for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; \
|
||||
done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \
|
||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \
|
||||
done
|
||||
|
||||
uninstall-pkgconfigDATA:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
|
||||
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
|
||||
dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir)
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run 'make' without going through this Makefile.
|
||||
# To change the values of 'make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in 'config.status', edit 'config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run 'make');
|
||||
# (2) otherwise, pass the desired values on the 'make' command line.
|
||||
$(am__recursive_targets):
|
||||
@fail=; \
|
||||
if $(am__make_keepgoing); then \
|
||||
failcom='fail=yes'; \
|
||||
else \
|
||||
failcom='exit 1'; \
|
||||
fi; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
ID: $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); mkid -fID $$unique
|
||||
tags: tags-recursive
|
||||
TAGS: tags
|
||||
|
||||
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
empty_fix=.; \
|
||||
else \
|
||||
include_option=--include; \
|
||||
empty_fix=; \
|
||||
fi; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test ! -f $$subdir/TAGS || \
|
||||
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
$(am__define_uniq_tagged_files); \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: ctags-recursive
|
||||
|
||||
CTAGS: ctags
|
||||
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
cscope: cscope.files
|
||||
test ! -s cscope.files \
|
||||
|| $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
|
||||
clean-cscope:
|
||||
-rm -f cscope.files
|
||||
cscope.files: clean-cscope cscopelist
|
||||
cscopelist: cscopelist-recursive
|
||||
|
||||
cscopelist-am: $(am__tagged_files)
|
||||
list='$(am__tagged_files)'; \
|
||||
case "$(srcdir)" in \
|
||||
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
||||
*) sdir=$(subdir)/$(srcdir) ;; \
|
||||
esac; \
|
||||
for i in $$list; do \
|
||||
if test -f "$$i"; then \
|
||||
echo "$(subdir)/$$i"; \
|
||||
else \
|
||||
echo "$$sdir/$$i"; \
|
||||
fi; \
|
||||
done >> $(top_builddir)/cscope.files
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
$(am__remove_distdir)
|
||||
test -d "$(distdir)" || mkdir "$(distdir)"
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
$(am__make_dryrun) \
|
||||
|| test -d "$(distdir)/$$subdir" \
|
||||
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
|
||||
$(am__relativize); \
|
||||
new_distdir=$$reldir; \
|
||||
dir1=$$subdir; dir2="$(top_distdir)"; \
|
||||
$(am__relativize); \
|
||||
new_top_distdir=$$reldir; \
|
||||
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
|
||||
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
|
||||
($(am__cd) $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$$new_top_distdir" \
|
||||
distdir="$$new_distdir" \
|
||||
am__remove_distdir=: \
|
||||
am__skip_length_check=: \
|
||||
am__skip_mode_fix=: \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
-test -n "$(am__skip_mode_fix)" \
|
||||
|| find "$(distdir)" -type d ! -perm -755 \
|
||||
-exec chmod u+rwx,go+rx {} \; -o \
|
||||
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|
||||
|| chmod -R a+r "$(distdir)"
|
||||
dist-gzip: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__post_remove_distdir)
|
||||
dist-bzip2: distdir
|
||||
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-lzip: distdir
|
||||
tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-xz: distdir
|
||||
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-tarZ: distdir
|
||||
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-shar: distdir
|
||||
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-zip: distdir
|
||||
-rm -f $(distdir).zip
|
||||
zip -rq $(distdir).zip $(distdir)
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist dist-all:
|
||||
$(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
# This target untars the dist file and tries a VPATH configuration. Then
|
||||
# it guarantees that the distribution is self-contained by making another
|
||||
# tarfile.
|
||||
distcheck: dist
|
||||
case '$(DIST_ARCHIVES)' in \
|
||||
*.tar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
|
||||
*.tar.bz2*) \
|
||||
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
|
||||
*.tar.lz*) \
|
||||
lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
|
||||
*.tar.xz*) \
|
||||
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
|
||||
*.tar.Z*) \
|
||||
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
|
||||
*.shar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
|
||||
*.zip*) \
|
||||
unzip $(distdir).zip ;;\
|
||||
esac
|
||||
chmod -R a-w $(distdir)
|
||||
chmod u+w $(distdir)
|
||||
mkdir $(distdir)/_build $(distdir)/_inst
|
||||
chmod a-w $(distdir)
|
||||
test -d $(distdir)/_build || exit 0; \
|
||||
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
|
||||
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
|
||||
&& am__cwd=`pwd` \
|
||||
&& $(am__cd) $(distdir)/_build \
|
||||
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
|
||||
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
|
||||
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
|
||||
distuninstallcheck \
|
||||
&& chmod -R a-w "$$dc_install_base" \
|
||||
&& ({ \
|
||||
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
|
||||
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
|
||||
} || { rm -rf "$$dc_destdir"; exit 1; }) \
|
||||
&& rm -rf "$$dc_destdir" \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dist \
|
||||
&& rm -rf $(DIST_ARCHIVES) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
|
||||
&& cd "$$am__cwd" \
|
||||
|| exit 1
|
||||
$(am__post_remove_distdir)
|
||||
@(echo "$(distdir) archives ready for distribution: "; \
|
||||
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
|
||||
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
|
||||
distuninstallcheck:
|
||||
@test -n '$(distuninstallcheck_dir)' || { \
|
||||
echo 'ERROR: trying to run $@ with an empty' \
|
||||
'$$(distuninstallcheck_dir)' >&2; \
|
||||
exit 1; \
|
||||
}; \
|
||||
$(am__cd) '$(distuninstallcheck_dir)' || { \
|
||||
echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
|
||||
exit 1; \
|
||||
}; \
|
||||
test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
|
||||
|| { echo "ERROR: files left after uninstall:" ; \
|
||||
if test -n "$(DESTDIR)"; then \
|
||||
echo " (check DESTDIR support)"; \
|
||||
fi ; \
|
||||
$(distuninstallcheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
distcleancheck: distclean
|
||||
@if test '$(srcdir)' = . ; then \
|
||||
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
|
||||
exit 1 ; \
|
||||
fi
|
||||
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|
||||
|| { echo "ERROR: files left in build directory after distclean:" ; \
|
||||
$(distcleancheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
all-am: Makefile $(DATA) config.h
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
for dir in "$(DESTDIR)$(pkgconfigdir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
install-data: install-data-recursive
|
||||
uninstall: uninstall-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-recursive
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-hdr \
|
||||
distclean-libtool distclean-tags
|
||||
|
||||
dvi: dvi-recursive
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-recursive
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-pkgconfigDATA
|
||||
|
||||
install-dvi: install-dvi-recursive
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-recursive
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-recursive
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-recursive
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -rf $(top_srcdir)/autom4te.cache
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-recursive
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-recursive
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-pkgconfigDATA
|
||||
|
||||
.MAKE: $(am__recursive_targets) all install-am install-strip
|
||||
|
||||
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
|
||||
am--refresh check check-am clean clean-cscope clean-generic \
|
||||
clean-libtool cscope cscopelist-am ctags ctags-am dist \
|
||||
dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \
|
||||
dist-xz dist-zip distcheck distclean distclean-generic \
|
||||
distclean-hdr distclean-libtool distclean-tags distcleancheck \
|
||||
distdir distuninstallcheck dvi dvi-am html html-am info \
|
||||
info-am install install-am install-data install-data-am \
|
||||
install-dvi install-dvi-am install-exec install-exec-am \
|
||||
install-html install-html-am install-info install-info-am \
|
||||
install-man install-pdf install-pdf-am install-pkgconfigDATA \
|
||||
install-ps install-ps-am install-strip installcheck \
|
||||
installcheck-am installdirs installdirs-am maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-generic \
|
||||
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
|
||||
uninstall-am uninstall-pkgconfigDATA
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
183
libcgroup-0.41/README
Normal file
183
libcgroup-0.41/README
Normal file
@ -0,0 +1,183 @@
|
||||
Design
|
||||
========
|
||||
|
||||
After cgroup system has taken shape, its time to have some basic tools
|
||||
in user space which can enable a user to use the resource management
|
||||
functionality effictively.
|
||||
|
||||
One of the needed functionality is rule based placement of a task. In general,
|
||||
there can be either uid or gid or exec based rules. Admin/root will
|
||||
control/enforce uid/gid based rules and exec based rules can be defined by
|
||||
user in a config file residing in user's home dir and fully controlled by user.
|
||||
|
||||
uid/gid based rules will be defined in /etc/cgrules.conf config file and
|
||||
this file will be managed by root.
|
||||
|
||||
Basic idea is that to begin with provide facility to implement rules
|
||||
based on uid and gid. So a hierarchy might look like as follows.
|
||||
|
||||
/mnt/cgroup
|
||||
| |
|
||||
gid1 gid2
|
||||
| |
|
||||
uid1 uid2
|
||||
| |
|
||||
proj1 proj2
|
||||
|
||||
|
||||
Admin will write rules to control the resources among users. Then users
|
||||
can manage their own cgroup at their own (proj1 and proj2) and control
|
||||
the resources as they want.
|
||||
|
||||
Following are the few methods using which tasks can be placed in right
|
||||
cgroups.
|
||||
|
||||
- Use pam_cgroup PAM plugin which will make sure users are placed in right
|
||||
cgroup at login time and any tasks launch after login, will continue to run
|
||||
in user's cgroup.
|
||||
|
||||
- Use command line tool "cgexec" to launch the task in right cgroup.
|
||||
|
||||
- Modify the program and use libcgroup provided APIs for placing a task
|
||||
in right cgroup before doing exec().
|
||||
|
||||
- Use "cgclassify" tool to classify a already running task.
|
||||
|
||||
- May be, a user space daemon can also be implemented which will listen to
|
||||
kernel events and place the task in right group based on the rules.
|
||||
This method involves few concerns.
|
||||
|
||||
- Reliability of netlink socket. Messages can be dropped.
|
||||
- Change the netlink with a cgroup controller which exports the
|
||||
events.
|
||||
|
||||
- Delay incurred since the event took place and task was actually placed
|
||||
in right cgroup.
|
||||
|
||||
- daemon will interfere with container's tasks which is not desired.
|
||||
|
||||
HOWTO
|
||||
=====
|
||||
|
||||
Section 1:
|
||||
----------
|
||||
To use "cgexec" to place the task in right cgroup.
|
||||
|
||||
- make cgexec
|
||||
- Run a task using cgexec. Following is the cgexec syntax.
|
||||
|
||||
cgexec [-g <list of controllers>:<relative path to cgroup>] command [arguments]
|
||||
|
||||
Note: Cgroup controllers and path are optional. If user does not know the
|
||||
right cgroup, cgexec will automatically place the task in right
|
||||
cgroup based on /etc/cgrules.conf
|
||||
|
||||
Example:
|
||||
cgexec -g *:test1 ls
|
||||
cgexec -g cpu,memory:test1 ls -l
|
||||
cgexec -g cpu,memory:test1 -g swap:test2 ls -l
|
||||
|
||||
Section 2
|
||||
---------
|
||||
To use "cgclassify" to place task in right cgroup.
|
||||
|
||||
- make cgclassify
|
||||
- Pick a task's pid to be classified, and run
|
||||
cgclassify <list of pids>
|
||||
|
||||
Example:
|
||||
--------
|
||||
cgclassify 2140 4325
|
||||
|
||||
Note: After classification check out whether tasks 2140 and 4325
|
||||
are in the right cgroup or not (Based on rules in /etc/cgrules.conf)
|
||||
|
||||
Section 3:
|
||||
----------
|
||||
To use a pam plugin which will automatically place the task in right
|
||||
cgroup upon login.
|
||||
|
||||
- Build pam_cgroup.so
|
||||
make pam_cgroup.so
|
||||
- Copy pam_cgroup.so to /lib/security/
|
||||
- Edit /etc/pam.d/su to make use of pam_cgroup.so session module upon
|
||||
execution of su.
|
||||
|
||||
example:
|
||||
Add following line at the end of /etc/pam.d/su file
|
||||
|
||||
session optional pam_cgroup.so
|
||||
|
||||
- Now launch a shell for a user "xyz" using su and the resulting shell
|
||||
should be running in the cgroup designated for the user as specified
|
||||
by cgrules.conf
|
||||
|
||||
ex. "su test1"
|
||||
|
||||
Try similar things with other services like sshd.
|
||||
|
||||
Note: pam_cgroup.so moves the service providing process in the right cgroup
|
||||
and not the process which will be launched later. Due to parent child
|
||||
relationship, yet to be forked/execed process will launch in right
|
||||
group.
|
||||
|
||||
Ex. Lets say user root does "su test1". In this case process "su" is the
|
||||
one providing service (launching a shell) for user "test1". pam_cgroup.so
|
||||
will move process "su" to the user "test1"'s cgroup (Decided by the uid
|
||||
and gid of "test1"). Now once su forks/execs a shell for user test1,
|
||||
final shell is effectively running in the cgroup it should have been
|
||||
running based on /etc/cgrules.conf for user test1.
|
||||
|
||||
|
||||
Section 4:
|
||||
----------
|
||||
To use cgrulesengd which will move a task to right cgroup based on
|
||||
rules in /etc/cgrules.conf do following.
|
||||
|
||||
- build and install latest libcgroup.so
|
||||
- build cgrulesengd
|
||||
make cgrulesengd
|
||||
- specify some uid/gid based rules in /etc/cgrules.conf
|
||||
- Mount some controllers and create an hierarchy of cgroups (matching
|
||||
your rules).
|
||||
- Run cgrulesengd.
|
||||
- ./cgrulesengd
|
||||
- Launch some task or login as a user to the sytem. Daemon should automatically
|
||||
place the task in right cgroup.
|
||||
|
||||
FAQ
|
||||
===
|
||||
Q. Why admin should not control "exec" based rules.
|
||||
A. Unix file system provides access control only based on uid/gid. So
|
||||
even if admin starts putting tasks based on uid/gid, it can't enforce
|
||||
it. For example, consider following scenario.
|
||||
|
||||
Lets say an admin creates following cgroup hierarchy.
|
||||
|
||||
/container
|
||||
| |
|
||||
database browser
|
||||
| | | |
|
||||
user1 user2 user1 user2
|
||||
|
||||
Now admin wants to run all the database jobs under /container/database/
|
||||
and all the firefox jobs under /container/browser/. Based on which user
|
||||
launched it, jobs should go in either user1 or user2 dir.
|
||||
|
||||
Now assume that database subdir has to more cpu resources as compared to
|
||||
browser subdir. Then a user, say user2, can always move his browser job
|
||||
also to /container/database/user2 dir to get more cpu resources and
|
||||
admin will not be able to control that.
|
||||
|
||||
[Note: user2 will control what tasks can be added in /container/database/user2
|
||||
and will contol what further subdirs can be created under user2 dir. Root
|
||||
should not restrict the control to root only for practical purposes. Its
|
||||
something like that till /container/databse, admin controls the resources
|
||||
and below that how resources are further subdivided among various projects
|
||||
should be controlled by respective user].
|
||||
|
||||
In the light of above, it seems to make more sense that admin should enforce
|
||||
rules only based on uid and gid. Probably later we can have a per user exec
|
||||
based rules config file (~/.cgrules.conf), which can be parsed by cgrulesd
|
||||
and then jobs launched by user will be placed in right cgroup based on
|
||||
combination of rules in /etc/cgrules.conf and ~/cgrules.conf.
|
182
libcgroup-0.41/README_daemon
Normal file
182
libcgroup-0.41/README_daemon
Normal file
@ -0,0 +1,182 @@
|
||||
DESCRIPTION
|
||||
===========
|
||||
The CGroup Rules Engine Daemon is a tool that will automatically place tasks
|
||||
into the correct cgroup based on UID/GID events from the kernel. It will not
|
||||
automatically classify tasks that are already running, but it will classify
|
||||
any new tasks, and any tasks which change their UID/GID. Note that we use
|
||||
the euid and egid, not the ruid and rgid.
|
||||
|
||||
Unlike other tools, cgrulesengd caches the rules configuration in a data
|
||||
structure (it's actually just a FIFO linked list) so that it doesn't need to
|
||||
parse the configuration file more than once. This should be much faster than
|
||||
parsing the rules for each UID/GID event. Eventually, this caching logic
|
||||
should be part of libcgroup, so that any other program can take advantage of it
|
||||
(and so that all programs are using the same table). The configuration can
|
||||
be reloaded without stopping the daemon (more information below).
|
||||
|
||||
WHY A DAEMON?
|
||||
=============
|
||||
A daemon is easy to use, and allows an administrator to ensure that all tasks
|
||||
are classified into the correct cgroups without constantly monitoring the
|
||||
system. The daemon is transparent to the users, and does not require any
|
||||
modifications to existing userspace programs. Finally, the daemon can be
|
||||
started and stopped at any time, including at boot time with other services.
|
||||
Thus, sytem administrators can decide not to use the daemon if they choose.
|
||||
|
||||
Most importantly, some programs create new users and/or run scripts,
|
||||
threads, etc. as those users using suexec(). This call does not go through
|
||||
PAM, so these scripts would continue running in the same cgroup as the parent
|
||||
program. This behavior is likely not ideal, and the daemon would solve this
|
||||
problem.
|
||||
|
||||
Apache does this. Apache creates a user called 'apache' and uses setuid() to
|
||||
launch tasks as that user. This does not go through PAM, so without a daemon,
|
||||
these tasks would continue to run in the 'root' cgroup rather than in the
|
||||
'apache' or 'webserver' cgroup. The daemon fixes this problem by catching the
|
||||
setuid() call and moving the tasks into the correct cgroup.
|
||||
|
||||
We would ask Apache to modify their software to interface with libcgroup, but
|
||||
this solution is less than optimal because a lot of userspace software would
|
||||
have to be changed, and some authors might intentionally not interact with
|
||||
libcgroup, which could create an exploit. The daemon is a simple, transparent
|
||||
solution.
|
||||
|
||||
USING THE DAEMON
|
||||
================
|
||||
The daemon can be used as a service with the cgred script, which is shipped
|
||||
as scripts/init.d/cgred. This script should be installed as /etc/init.d/cgred
|
||||
and used like any other service. To start the daemon,
|
||||
/etc/init.d/cgred start
|
||||
To stop it,
|
||||
/etc/init.d/cgred stop
|
||||
The restart (stop,start), condrestart (same as restart, but only if the daemon
|
||||
was already started), and status (print whether the daemon is started or
|
||||
stopped) commands are also supported. An additional command, "reload", allows
|
||||
you to reload the configuration file without stopping the daemon.
|
||||
/etc/init.d/cgred reload
|
||||
The cgred script automatically loads configuration from /etc/sysconfig/cgred.conf,
|
||||
which is shipped as samples/cgred.conf. See that file for more information.
|
||||
|
||||
If you choose not to run the daemon as a service, the following options are
|
||||
currently supported:
|
||||
--nodaemon Do not run as a daemon
|
||||
--nolog Write log output to stdout instead of a log file
|
||||
--config [FILE] Read rules configuration from FILE instead of
|
||||
/etc/cgrules.conf
|
||||
|
||||
You can ask the daemon to reload the rules configuration by sending it SIGUSR2.
|
||||
The easiest way to do this is with the 'kill' command:
|
||||
kill -s SIGUSR2 [PID]
|
||||
|
||||
You can ask the daemon to reload the templates configuration by sending it
|
||||
SIGUSR1. The easiest way to do this is with the 'kill' command:
|
||||
kill -s SIGUSR1 [PID]
|
||||
|
||||
TESTING
|
||||
=======
|
||||
The program setuid (found in tests/setuid.c) can help you test the daemon. By
|
||||
default, this program attempts to change its UID to root and then idles until
|
||||
you kill it. You can change the default behavior to use a different UID, or
|
||||
you can uncomment the second block of code to instead attempt to change the
|
||||
GID.
|
||||
|
||||
In order to make sure that everything works, I used the following rules:
|
||||
sjo cpu default
|
||||
cgtest cpu cgtest
|
||||
% memory default
|
||||
@cgroup cpu,memory cgtest
|
||||
peter cpu test1
|
||||
% memory test2
|
||||
@root * default
|
||||
* * default
|
||||
|
||||
The users 'sjo' and 'cgtest' were normal users. 'peter' is not a user on the
|
||||
system. The group 'cgroup' is a group containing sjo,root,cgtest as members,
|
||||
and the group 'root' contains only root. The cgroups 'default' and 'cgtest'
|
||||
exist, while 'test1' and 'test2' do not. Currently, the daemon does not check
|
||||
for the existance of 'test1', though this would be easier to do once the
|
||||
parsing and caching logic is moved into libcgroup.
|
||||
|
||||
I ran the following tests, all of which were successful:
|
||||
- set UID to sjo (should move cpu controller into default)
|
||||
- set UID to root (should move cpu,memory controllers into cgtest)
|
||||
- set UID to cgtest (should move cpu controller into cgtest, memory
|
||||
controller into default)
|
||||
- set GID to root (should move all controllers into default)
|
||||
- set GID to cgroup (should move cpu, memory into cgtest)
|
||||
- set GID to users (should move all controllers into default)
|
||||
|
||||
The parsing logic will skip the 'peter' rule as well as its multi-line
|
||||
components (in this case "% memory test2"), because the user does not exist.
|
||||
This should work for group rules, too. Attempting to setuid() or setgid() to a
|
||||
user/group that doesn't exist will just return an error and not generate a
|
||||
kernel event of the PROC_EVENT_UID or PROC_EVENT_GID type, so the daemon won't
|
||||
do anything for it.
|
||||
|
||||
CONCERNS/ISSUES
|
||||
===============
|
||||
- Netlink can be unreliable, and the daemon might miss an event if the buffer
|
||||
is full. One possible solution is to have one or two files that the kernel
|
||||
can queue UID/GID changes in, and have the daemon read those files whenever
|
||||
they are updated. From testing, this does not actually appear to be a real
|
||||
problem, but it could become one with faster machines.
|
||||
- The daemon does not care for namespaces at all, which can cause conflicts
|
||||
with containers. If a user places his tasks into exec-based cgroups (such
|
||||
as 'network' and 'development'), the daemon will not realize this and will
|
||||
simply place them into the user's cgroup (so, sjo/ instead of sjo/network/).
|
||||
|
||||
CHANGELOG
|
||||
=========
|
||||
V9:
|
||||
- Updated documentation, because it was very old and incorrect.
|
||||
- Reverted the changes to cgexec and cgclassify.
|
||||
- New API function: cgroup_change_cgroup_uid_gid_flags().
|
||||
- Deprecated cgroup_change_cgroup_uid_gid().
|
||||
- Rewrote some of the rule matching and execution logic in api.c to be
|
||||
faster, and easier to read.
|
||||
- Changes all negative return values to positive values. As a side effect,
|
||||
cgroup_parse_rules() now returns -1 when we get a match and we are using
|
||||
non-cached rules.
|
||||
- Changes CGROUP_FUSECACHE to CGFLAG_USECACHE.
|
||||
- Flags are now enumerated (cgflags), instead of #defines.
|
||||
|
||||
V8:
|
||||
- Moved the event-handling logic back into the daemon, where it should be.
|
||||
- Changed cgroup_parse_rules() to work with cached rules or non-cached rules.
|
||||
The other parsing function is no longer needed, and should be deprecated.
|
||||
- Non-cached rules now work with the same structs as cached rules.
|
||||
- Modified cgroup_change_cgroup_uid_gid() with a new 'flags' parameter.
|
||||
Currently, the only flag is "CGROUP_FUSECACHE" to use the cached rules logic
|
||||
(or not).
|
||||
- Added cgroup_rules_loaded() boolean, to check whether the cached rules have
|
||||
been loaded yet, and cgroup_init_rules_cache() to load them.
|
||||
- Modified cgexec and cgclassify to work with the new
|
||||
cgroup_change_cgroup_uid_gid().
|
||||
|
||||
V7:
|
||||
- Moved parsing and caching logic into libcgroup.
|
||||
- Added locking mechanisms around the list of rules.
|
||||
- Cleaned up #includes in cgrulesegnd.[h,c].
|
||||
- Added notification if netlink receive queue overflows.
|
||||
- Added logic to catch SIGINT in addition to SIGTERM.
|
||||
- New API functions:
|
||||
- cgroup_free_rule(struct cgroup_rule*)
|
||||
- cgroup_free_rule_list(struct cgroup_rule_list*)
|
||||
- cgroup_parse_rules(void)
|
||||
- cgroup_print_rules_config(FILE*)
|
||||
- cgroup_reload_cached_rules(void)
|
||||
- cgroup_change_cgroup_event(struct proc_event*, int, FILE*)
|
||||
|
||||
V6:
|
||||
- Wrote new parsing logic, which is cleaner and simpler.
|
||||
- Added cgred script to enable using the daemon as a service.
|
||||
- Wrote caching logic to cache rules table.
|
||||
- Added the ability to force a reload of the rules table with SIGUSR2 signal.
|
||||
- Added two structures to libcgroup: cgre_rule and cgre_rules_list
|
||||
- New API function: cgroup_reload_cached_rules, which reloads the rules table.
|
||||
- Added logging capabilities (default log is /root/cgrulesengd.conf)
|
||||
|
||||
TODO
|
||||
====
|
||||
- Find a way to replace Netlink, or at least clean up that code.
|
||||
- Find a solution to the namespace problem.
|
69
libcgroup-0.41/README_systemd
Normal file
69
libcgroup-0.41/README_systemd
Normal file
@ -0,0 +1,69 @@
|
||||
Integration with systemd
|
||||
========================
|
||||
|
||||
systemd is a system and service manager for Linux, compatible with SysV
|
||||
and LSB init scripts. systemd heavily uses control groups to manage and control
|
||||
services.
|
||||
|
||||
Most of the libcgroup tools and APIs can be safely used on systems with systemd
|
||||
without any problems. This document attempts to describe the configuration of
|
||||
systemd and libcgroup so they can safely co-exist and mutually benefit each
|
||||
other.
|
||||
|
||||
References
|
||||
==========
|
||||
[1] http://www.freedesktop.org/wiki/Software/systemd
|
||||
Systemd home page.
|
||||
|
||||
[2] http://www.freedesktop.org/wiki/Software/systemd/PaxControlGroups
|
||||
This is the most useful document describing systemd expectations on applications
|
||||
(incl. libcgroup tools).
|
||||
|
||||
|
||||
Compilation
|
||||
===========
|
||||
As stated in [2], libcgroup should not interact with the 'name=systemd'
|
||||
hierarchy. Compile libcgroup with the --enable-opaque-hierarchy configure option
|
||||
to do so:
|
||||
|
||||
./configure --enable-opaque-hierarchy=name=systemd
|
||||
|
||||
Consequently, the 'name=systemd' hierarchy will not be visible to libcgroup and
|
||||
all of its tools. For example, the lscgroup command will not list systemd
|
||||
cgroups and the cgclear command will not remove them.
|
||||
|
||||
Start-up and services
|
||||
====================
|
||||
|
||||
Systemd automatically mounts all available controllers on system boot ('cpu' and
|
||||
'cpuacct' together in one hierarchy by default) and can automatically put
|
||||
service processes into control groups with configured parameters — by default,
|
||||
each service is automatically put into the 'cpu,cpuacct:/system/$service_name'
|
||||
control group. The System Administrator has full control of parameters in each
|
||||
control group and of which controllers are used. Consult systemd
|
||||
documentation, mainly systemd.conf(5) and systemd.exec(5) man pages, for
|
||||
details.
|
||||
|
||||
In the vast majority of use cases, this behavior is sufficient and libcgroup
|
||||
does not need to be used.
|
||||
|
||||
For specific use cases, e.g. when a different tree of control groups is needed,
|
||||
libcgroup provides cgconfig service. This service can create arbitrary control
|
||||
group hierarchies. In this case, follow these steps:
|
||||
|
||||
1. Set 'DefaultControllers=' in /etc/systemd/system.conf so that systemd does
|
||||
not create control groups for services automatically.
|
||||
|
||||
2. Prepare /etc/cgconfig.conf and enable the cgconfig service. The service will
|
||||
parse the /etc/cgconfig.conf file during machine boot and create all control
|
||||
groups which are defined in it. The service automatically sets '+t' ("sticky")
|
||||
bit on the tasks files as recommended in [2].
|
||||
|
||||
3. For each service that should start in a specific control group, add the
|
||||
following lines into its unit file:
|
||||
After=cgconfig.service
|
||||
ControlGroup=<name of the control group(s)>
|
||||
|
||||
This ensures the service is started only after cgconfig creates the necessary
|
||||
hierarchy for it. It also tells systemd which control group it should use to
|
||||
start the service.
|
9654
libcgroup-0.41/aclocal.m4
vendored
Normal file
9654
libcgroup-0.41/aclocal.m4
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1535
libcgroup-0.41/config.guess
vendored
Executable file
1535
libcgroup-0.41/config.guess
vendored
Executable file
File diff suppressed because it is too large
Load Diff
176
libcgroup-0.41/config.h.in
Normal file
176
libcgroup-0.41/config.h.in
Normal file
@ -0,0 +1,176 @@
|
||||
/* config.h.in. Generated from configure.in by autoheader. */
|
||||
|
||||
/* Cgrulesengd socket path */
|
||||
#undef CGRULE_CGRED_SOCKET_PATH
|
||||
|
||||
/* Define to 1 if your system has a working `chown' function. */
|
||||
#undef HAVE_CHOWN
|
||||
|
||||
/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
|
||||
*/
|
||||
#undef HAVE_DIRENT_H
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#undef HAVE_DLFCN_H
|
||||
|
||||
/* Define to 1 if you have the `getmntent' function. */
|
||||
#undef HAVE_GETMNTENT
|
||||
|
||||
/* Define to 1 if you have the `hasmntopt' function. */
|
||||
#undef HAVE_HASMNTOPT
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define to 1 if you have the <limits.h> header file. */
|
||||
#undef HAVE_LIMITS_H
|
||||
|
||||
/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
|
||||
to 0 otherwise. */
|
||||
#undef HAVE_MALLOC
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have the `memset' function. */
|
||||
#undef HAVE_MEMSET
|
||||
|
||||
/* Define to 1 if you have the `mkdir' function. */
|
||||
#undef HAVE_MKDIR
|
||||
|
||||
/* Define to 1 if you have the <mntent.h> header file. */
|
||||
#undef HAVE_MNTENT_H
|
||||
|
||||
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
|
||||
#undef HAVE_NDIR_H
|
||||
|
||||
/* Define to 1 if your system has a GNU libc compatible `realloc' function,
|
||||
and to 0 otherwise. */
|
||||
#undef HAVE_REALLOC
|
||||
|
||||
/* Define to 1 if you have the `rmdir' function. */
|
||||
#undef HAVE_RMDIR
|
||||
|
||||
/* Define to 1 if you have the <security/pam_ext.h> header file. */
|
||||
#undef HAVE_SECURITY_PAM_EXT_H
|
||||
|
||||
/* Define to 1 if you have the <security/pam_modules.h> header file. */
|
||||
#undef HAVE_SECURITY_PAM_MODULES_H
|
||||
|
||||
/* Define to 1 if you have the <security/pam_modutil.h> header file. */
|
||||
#undef HAVE_SECURITY_PAM_MODUTIL_H
|
||||
|
||||
/* Define to 1 if `stat' has the bug that it succeeds when given the
|
||||
zero-length file name argument. */
|
||||
#undef HAVE_STAT_EMPTY_STRING_BUG
|
||||
|
||||
/* Define to 1 if stdbool.h conforms to C99. */
|
||||
#undef HAVE_STDBOOL_H
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
/* Define to 1 if you have the `strdup' function. */
|
||||
#undef HAVE_STRDUP
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
|
||||
/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
|
||||
*/
|
||||
#undef HAVE_SYS_DIR_H
|
||||
|
||||
/* Define to 1 if you have the <sys/mount.h> header file. */
|
||||
#undef HAVE_SYS_MOUNT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
|
||||
*/
|
||||
#undef HAVE_SYS_NDIR_H
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Define to 1 if the system has the type `_Bool'. */
|
||||
#undef HAVE__BOOL
|
||||
|
||||
/* Define to 1 if `lstat' dereferences a symlink specified with a trailing
|
||||
slash. */
|
||||
#undef LSTAT_FOLLOWS_SLASHED_SYMLINK
|
||||
|
||||
/* Define to the sub-directory in which libtool stores uninstalled libraries.
|
||||
*/
|
||||
#undef LT_OBJDIR
|
||||
|
||||
/* Define to ignore specific hierarchy. */
|
||||
#undef OPAQUE_HIERARCHY
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the home page for this package. */
|
||||
#undef PACKAGE_URL
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
||||
|
||||
/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
|
||||
`char[]'. */
|
||||
#undef YYTEXT_POINTER
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
#undef const
|
||||
|
||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||
#undef gid_t
|
||||
|
||||
/* Define to `__inline__' or `__inline' if that's what the C compiler
|
||||
calls it, or to nothing if 'inline' is not supported under any name. */
|
||||
#ifndef __cplusplus
|
||||
#undef inline
|
||||
#endif
|
||||
|
||||
/* Define to the type of a signed integer type of width exactly 64 bits if
|
||||
such a type exists and the standard includes do not define it. */
|
||||
#undef int64_t
|
||||
|
||||
/* Define to rpl_malloc if the replacement function should be used. */
|
||||
#undef malloc
|
||||
|
||||
/* Define to `int' if <sys/types.h> does not define. */
|
||||
#undef pid_t
|
||||
|
||||
/* Define to rpl_realloc if the replacement function should be used. */
|
||||
#undef realloc
|
||||
|
||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||
#undef uid_t
|
1790
libcgroup-0.41/config.sub
vendored
Executable file
1790
libcgroup-0.41/config.sub
vendored
Executable file
File diff suppressed because it is too large
Load Diff
19386
libcgroup-0.41/configure
vendored
Executable file
19386
libcgroup-0.41/configure
vendored
Executable file
File diff suppressed because it is too large
Load Diff
221
libcgroup-0.41/configure.in
Normal file
221
libcgroup-0.41/configure.in
Normal file
@ -0,0 +1,221 @@
|
||||
# -*- Autoconf -*-
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
#
|
||||
# Copyright International Business Machines Corp. 2008
|
||||
#
|
||||
# Authors: Balbir Singh <balbir@linux.vnet.ibm.com>
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of version 2.1 of the GNU Lesser General Public License
|
||||
# as published by the Free Software Foundation.
|
||||
#
|
||||
# This program is distributed in the hope that it would be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
#
|
||||
AC_PREREQ(2.61)
|
||||
|
||||
# In following section update all occurences of version, including soname
|
||||
AC_INIT([libcgroup], 0.41)
|
||||
AM_INIT_AUTOMAKE([foreign dist-bzip2])
|
||||
|
||||
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
||||
|
||||
# set library version, soname is libcgroup.so.MAJOR
|
||||
AC_SUBST(LIBRARY_VERSION_MAJOR, 1)
|
||||
AC_SUBST(LIBRARY_VERSION_MINOR, 0)
|
||||
AC_SUBST(LIBRARY_VERSION_RELEASE, 41)
|
||||
|
||||
# we do not want static libraries
|
||||
AC_DISABLE_STATIC
|
||||
|
||||
AC_CONFIG_SRCDIR([src])
|
||||
AC_CONFIG_HEADER([config.h])
|
||||
|
||||
AC_ARG_ENABLE([bindings],
|
||||
[AC_HELP_STRING([--enable-bindings],
|
||||
[enable python bindings [default=no]])],
|
||||
[
|
||||
if test "x$enableval" = xno; then
|
||||
with_bindings=false
|
||||
else
|
||||
with_bindings=true
|
||||
fi
|
||||
],
|
||||
[with_bindings = false])
|
||||
AM_CONDITIONAL([WITH_BINDINGS], [test x$with_bindings = xtrue])
|
||||
|
||||
# Process command line options
|
||||
AC_ARG_ENABLE([tools],
|
||||
[AC_HELP_STRING([--enable-tools],
|
||||
[compile libcgroup tools [default=yes]])],
|
||||
[
|
||||
if test "x$enableval" = xno; then
|
||||
with_tools=false
|
||||
else
|
||||
with_tools=true
|
||||
fi
|
||||
],
|
||||
[with_tools=true])
|
||||
AM_CONDITIONAL([WITH_TOOLS], [test x$with_tools = xtrue])
|
||||
|
||||
AC_ARG_ENABLE([pam],
|
||||
[AC_HELP_STRING([--enable-pam],
|
||||
[compile libcgroup PAM module [default=yes]])],
|
||||
[
|
||||
if test "x$enableval" = xno; then
|
||||
with_pam=false
|
||||
else
|
||||
with_pam=true
|
||||
fi
|
||||
],
|
||||
[with_pam=true])
|
||||
AM_CONDITIONAL([WITH_PAM], [test x$with_pam = xtrue])
|
||||
|
||||
AC_ARG_ENABLE([daemon],
|
||||
[AC_HELP_STRING([--enable-daemon],
|
||||
[compile libcgroup daemon [default=yes]])],
|
||||
[
|
||||
if test "x$enableval" = xno; then
|
||||
with_daemon=false
|
||||
else
|
||||
with_daemon=true
|
||||
fi
|
||||
],
|
||||
[with_daemon=true])
|
||||
AM_CONDITIONAL([WITH_DAEMON], [test x$with_daemon = xtrue])
|
||||
|
||||
AC_ARG_ENABLE([initscript-install],
|
||||
[AC_HELP_STRING([--enable-initscript-install],
|
||||
[install init scripts [default=no]])],
|
||||
[
|
||||
if test "x$enableval" = xno; then
|
||||
with_initscript_install=false
|
||||
else
|
||||
with_initscript_install=true
|
||||
fi
|
||||
],
|
||||
[with_initscript_install=false])
|
||||
AM_CONDITIONAL([WITH_INITSCRIPT_INSTALL], [test x$with_initscript_install = xtrue])
|
||||
|
||||
socket_path="/var/run/cgred.socket"
|
||||
AC_ARG_ENABLE([cgred-socket],
|
||||
[AC_HELP_STRING([--enable-cgred-socket=PATH],
|
||||
specify location of cgrulesengd communication socket
|
||||
(default=/var/run/cgred.socket))],
|
||||
[
|
||||
if test "x$enableval" = xno -o "x$enableval" = xyes; then
|
||||
AC_MSG_ERROR([Provide valid path with --enable-cgred-socket option.])
|
||||
else
|
||||
socket_path="$enableval"
|
||||
fi
|
||||
], [])
|
||||
AC_DEFINE_UNQUOTED([CGRULE_CGRED_SOCKET_PATH],"$socket_path", [Cgrulesengd socket path])
|
||||
|
||||
pam_module_dir="$libdir/security"
|
||||
AC_ARG_ENABLE([pam-module-dir],
|
||||
[AC_HELP_STRING([--enable-pam-module-dir=PATH],
|
||||
specify location of libcgroup PAM module
|
||||
(default=$libdir/security))],
|
||||
[
|
||||
if test "x$enableval" = xno -o "x$enableval" = xyes; then
|
||||
AC_MSG_ERROR([Provide valid path with --enable-pam-module-dir option.])
|
||||
else
|
||||
pam_module_dir="$enableval"
|
||||
fi
|
||||
], [])
|
||||
AC_SUBST([pamlibdir],"$pam_module_dir")
|
||||
|
||||
AC_ARG_ENABLE([opaque-hierarchy],
|
||||
[AC_HELP_STRING([--enable-opaque-hierarchy=NAME],
|
||||
[specify name of a hierarchy which libcgroup should ignore, e.g. name=systemd]
|
||||
(default=none))],
|
||||
[
|
||||
if test "x$enableval" = xno -o "x$enableval" = xyes; then
|
||||
AC_MSG_ERROR([Provide name of a hierarchy.])
|
||||
else
|
||||
AC_DEFINE_UNQUOTED([OPAQUE_HIERARCHY], "$enableval",
|
||||
[Define to ignore specific hierarchy.])
|
||||
fi
|
||||
], [])
|
||||
|
||||
# Checks for programs.
|
||||
AC_PROG_CXX
|
||||
AC_PROG_CC
|
||||
AC_PROG_YACC
|
||||
if test "$YACC" = yacc; then
|
||||
AC_CHECK_PROG([REALLY_YACC], [yacc], [yacc])
|
||||
if test "$REALLY_YACC" = ""; then
|
||||
AC_MSG_ERROR([This program cannot be built unless a version of yacc is installed.])
|
||||
fi
|
||||
fi
|
||||
AM_PROG_LEX
|
||||
if test "$LEX" != flex; then
|
||||
AC_MSG_ERROR([This program cannot be built unless flex is installed.])
|
||||
fi
|
||||
AC_PROG_LIBTOOL
|
||||
|
||||
# Checks for header files.
|
||||
AC_HEADER_DIRENT
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS([limits.h mntent.h stdlib.h string.h sys/mount.h unistd.h])
|
||||
|
||||
# Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_HEADER_STDBOOL
|
||||
AC_C_CONST
|
||||
AC_TYPE_UID_T
|
||||
AC_C_INLINE
|
||||
AC_TYPE_INT64_T
|
||||
AC_TYPE_PID_T
|
||||
|
||||
# Checks for library functions.
|
||||
AC_FUNC_CHOWN
|
||||
AC_FUNC_GETMNTENT
|
||||
AC_FUNC_MALLOC
|
||||
AC_FUNC_REALLOC
|
||||
AC_FUNC_STAT
|
||||
AC_CHECK_FUNCS([getmntent hasmntopt memset mkdir rmdir strdup])
|
||||
|
||||
if test x$with_pam = xtrue; then
|
||||
AC_CHECK_LIB(
|
||||
[pam],
|
||||
[pam_syslog],
|
||||
[
|
||||
dnl Override the default behavior of AC_CHECK_LIB,
|
||||
dnl we don't want -lpam in LIBS.
|
||||
:
|
||||
],
|
||||
[AC_MSG_ERROR([Cannot compile PAM module without libpam!])])
|
||||
|
||||
AC_CHECK_HEADERS(
|
||||
[security/pam_modules.h security/pam_modutil.h security/pam_ext.h],
|
||||
[],
|
||||
[AC_MSG_ERROR([Cannot compile PAM module without necessary
|
||||
header files!])])
|
||||
fi
|
||||
|
||||
AC_CONFIG_FILES([Makefile
|
||||
tests/Makefile
|
||||
tests/tools/testenv.sh
|
||||
tests/tools/Makefile
|
||||
tests/tools/cgconfigparser/Makefile
|
||||
tests/tools/cgclassify/Makefile
|
||||
tests/tools/multimount/Makefile
|
||||
tests/runlibcgrouptest.sh
|
||||
src/Makefile
|
||||
src/daemon/Makefile
|
||||
src/tools/Makefile
|
||||
src/pam/Makefile
|
||||
src/bindings/Makefile
|
||||
scripts/Makefile
|
||||
scripts/init.d/cgconfig
|
||||
scripts/init.d/cgred
|
||||
samples/Makefile
|
||||
include/Makefile
|
||||
doc/Makefile
|
||||
doc/man/Makefile
|
||||
dist/Makefile
|
||||
libcgroup.pc])
|
||||
AC_CONFIG_FILES([dist/libcgroup.spec:dist/libcgroup.spec.in])
|
||||
CFLAGS="$CFLAGS -Wall"
|
||||
AC_OUTPUT
|
||||
|
791
libcgroup-0.41/depcomp
Executable file
791
libcgroup-0.41/depcomp
Executable file
@ -0,0 +1,791 @@
|
||||
#! /bin/sh
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
|
||||
scriptversion=2013-05-30.07; # UTC
|
||||
|
||||
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Run PROGRAMS ARGS to compile a file, generating dependencies
|
||||
as side-effects.
|
||||
|
||||
Environment variables:
|
||||
depmode Dependency tracking mode.
|
||||
source Source file read by 'PROGRAMS ARGS'.
|
||||
object Object file output by 'PROGRAMS ARGS'.
|
||||
DEPDIR directory where to store dependencies.
|
||||
depfile Dependency file to output.
|
||||
tmpdepfile Temporary file to use when outputting dependencies.
|
||||
libtool Whether libtool is used (yes/no).
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "depcomp $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
esac
|
||||
|
||||
# Get the directory component of the given path, and save it in the
|
||||
# global variables '$dir'. Note that this directory component will
|
||||
# be either empty or ending with a '/' character. This is deliberate.
|
||||
set_dir_from ()
|
||||
{
|
||||
case $1 in
|
||||
*/*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
|
||||
*) dir=;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Get the suffix-stripped basename of the given path, and save it the
|
||||
# global variable '$base'.
|
||||
set_base_from ()
|
||||
{
|
||||
base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
|
||||
}
|
||||
|
||||
# If no dependency file was actually created by the compiler invocation,
|
||||
# we still have to create a dummy depfile, to avoid errors with the
|
||||
# Makefile "include basename.Plo" scheme.
|
||||
make_dummy_depfile ()
|
||||
{
|
||||
echo "#dummy" > "$depfile"
|
||||
}
|
||||
|
||||
# Factor out some common post-processing of the generated depfile.
|
||||
# Requires the auxiliary global variable '$tmpdepfile' to be set.
|
||||
aix_post_process_depfile ()
|
||||
{
|
||||
# If the compiler actually managed to produce a dependency file,
|
||||
# post-process it.
|
||||
if test -f "$tmpdepfile"; then
|
||||
# Each line is of the form 'foo.o: dependency.h'.
|
||||
# Do two passes, one to just change these to
|
||||
# $object: dependency.h
|
||||
# and one to simply output
|
||||
# dependency.h:
|
||||
# which is needed to avoid the deleted-header problem.
|
||||
{ sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
|
||||
sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
|
||||
} > "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
else
|
||||
make_dummy_depfile
|
||||
fi
|
||||
}
|
||||
|
||||
# A tabulation character.
|
||||
tab=' '
|
||||
# A newline character.
|
||||
nl='
|
||||
'
|
||||
# Character ranges might be problematic outside the C locale.
|
||||
# These definitions help.
|
||||
upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
||||
lower=abcdefghijklmnopqrstuvwxyz
|
||||
digits=0123456789
|
||||
alpha=${upper}${lower}
|
||||
|
||||
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
|
||||
depfile=${depfile-`echo "$object" |
|
||||
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
|
||||
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||
|
||||
rm -f "$tmpdepfile"
|
||||
|
||||
# Avoid interferences from the environment.
|
||||
gccflag= dashmflag=
|
||||
|
||||
# Some modes work just like other modes, but use different flags. We
|
||||
# parameterize here, but still list the modes in the big case below,
|
||||
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||
# here, because this file can only contain one case statement.
|
||||
if test "$depmode" = hp; then
|
||||
# HP compiler uses -M and no extra arg.
|
||||
gccflag=-M
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
if test "$depmode" = dashXmstdout; then
|
||||
# This is just like dashmstdout with a different argument.
|
||||
dashmflag=-xM
|
||||
depmode=dashmstdout
|
||||
fi
|
||||
|
||||
cygpath_u="cygpath -u -f -"
|
||||
if test "$depmode" = msvcmsys; then
|
||||
# This is just like msvisualcpp but w/o cygpath translation.
|
||||
# Just convert the backslash-escaped backslashes to single forward
|
||||
# slashes to satisfy depend.m4
|
||||
cygpath_u='sed s,\\\\,/,g'
|
||||
depmode=msvisualcpp
|
||||
fi
|
||||
|
||||
if test "$depmode" = msvc7msys; then
|
||||
# This is just like msvc7 but w/o cygpath translation.
|
||||
# Just convert the backslash-escaped backslashes to single forward
|
||||
# slashes to satisfy depend.m4
|
||||
cygpath_u='sed s,\\\\,/,g'
|
||||
depmode=msvc7
|
||||
fi
|
||||
|
||||
if test "$depmode" = xlc; then
|
||||
# IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
|
||||
gccflag=-qmakedep=gcc,-MF
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
case "$depmode" in
|
||||
gcc3)
|
||||
## gcc 3 implements dependency tracking that does exactly what
|
||||
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
||||
## it if -MD -MP comes after the -MF stuff. Hmm.
|
||||
## Unfortunately, FreeBSD c89 acceptance of flags depends upon
|
||||
## the command line argument order; so add the flags where they
|
||||
## appear in depend2.am. Note that the slowdown incurred here
|
||||
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
|
||||
*) set fnord "$@" "$arg" ;;
|
||||
esac
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
done
|
||||
"$@"
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
mv "$tmpdepfile" "$depfile"
|
||||
;;
|
||||
|
||||
gcc)
|
||||
## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
|
||||
## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
|
||||
## (see the conditional assignment to $gccflag above).
|
||||
## There are various ways to get dependency output from gcc. Here's
|
||||
## why we pick this rather obscure method:
|
||||
## - Don't want to use -MD because we'd like the dependencies to end
|
||||
## up in a subdir. Having to rename by hand is ugly.
|
||||
## (We might end up doing this anyway to support other compilers.)
|
||||
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||
## -MM, not -M (despite what the docs say). Also, it might not be
|
||||
## supported by the other compilers which use the 'gcc' depmode.
|
||||
## - Using -M directly means running the compiler twice (even worse
|
||||
## than renaming).
|
||||
if test -z "$gccflag"; then
|
||||
gccflag=-MD,
|
||||
fi
|
||||
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
# The second -e expression handles DOS-style file names with drive
|
||||
# letters.
|
||||
sed -e 's/^[^:]*: / /' \
|
||||
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||
## This next piece of magic avoids the "deleted header file" problem.
|
||||
## The problem is that when a header file which appears in a .P file
|
||||
## is deleted, the dependency causes make to die (because there is
|
||||
## typically no way to rebuild the header). We avoid this by adding
|
||||
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||
## this for us directly.
|
||||
## Some versions of gcc put a space before the ':'. On the theory
|
||||
## that the space means something, we add a space to the output as
|
||||
## well. hp depmode also adds that space, but also prefixes the VPATH
|
||||
## to the object. Take care to not repeat it in the output.
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
sgi)
|
||||
if test "$libtool" = yes; then
|
||||
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
||||
else
|
||||
"$@" -MDupdate "$tmpdepfile"
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
|
||||
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||
echo "$object : \\" > "$depfile"
|
||||
# Clip off the initial element (the dependent). Don't try to be
|
||||
# clever and replace this with sed code, as IRIX sed won't handle
|
||||
# lines with more than a fixed number of characters (4096 in
|
||||
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
||||
# the IRIX cc adds comments like '#:fec' to the end of the
|
||||
# dependency line.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
|
||||
| tr "$nl" ' ' >> "$depfile"
|
||||
echo >> "$depfile"
|
||||
# The second pass generates a dummy entry for each header file.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> "$depfile"
|
||||
else
|
||||
make_dummy_depfile
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
xlc)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
aix)
|
||||
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||
# in a .u file. In older versions, this file always lives in the
|
||||
# current directory. Also, the AIX compiler puts '$object:' at the
|
||||
# start of each line; $object doesn't have directory information.
|
||||
# Version 6 uses the directory in both cases.
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$base.u
|
||||
tmpdepfile3=$dir.libs/$base.u
|
||||
"$@" -Wc,-M
|
||||
else
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$dir$base.u
|
||||
tmpdepfile3=$dir$base.u
|
||||
"$@" -M
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
aix_post_process_depfile
|
||||
;;
|
||||
|
||||
tcc)
|
||||
# tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
|
||||
# FIXME: That version still under development at the moment of writing.
|
||||
# Make that this statement remains true also for stable, released
|
||||
# versions.
|
||||
# It will wrap lines (doesn't matter whether long or short) with a
|
||||
# trailing '\', as in:
|
||||
#
|
||||
# foo.o : \
|
||||
# foo.c \
|
||||
# foo.h \
|
||||
#
|
||||
# It will put a trailing '\' even on the last line, and will use leading
|
||||
# spaces rather than leading tabs (at least since its commit 0394caf7
|
||||
# "Emit spaces for -MD").
|
||||
"$@" -MD -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
|
||||
# We have to change lines of the first kind to '$object: \'.
|
||||
sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
|
||||
# And for each line of the second kind, we have to emit a 'dep.h:'
|
||||
# dummy dependency, to avoid the deleted-header problem.
|
||||
sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
## The order of this option in the case statement is important, since the
|
||||
## shell code in configure will try each of these formats in the order
|
||||
## listed in this file. A plain '-MD' option would be understood by many
|
||||
## compilers, so we must ensure this comes after the gcc and icc options.
|
||||
pgcc)
|
||||
# Portland's C compiler understands '-MD'.
|
||||
# Will always output deps to 'file.d' where file is the root name of the
|
||||
# source file under compilation, even if file resides in a subdirectory.
|
||||
# The object file name does not affect the name of the '.d' file.
|
||||
# pgcc 10.2 will output
|
||||
# foo.o: sub/foo.c sub/foo.h
|
||||
# and will wrap long lines using '\' :
|
||||
# foo.o: sub/foo.c ... \
|
||||
# sub/foo.h ... \
|
||||
# ...
|
||||
set_dir_from "$object"
|
||||
# Use the source, not the object, to determine the base name, since
|
||||
# that's sadly what pgcc will do too.
|
||||
set_base_from "$source"
|
||||
tmpdepfile=$base.d
|
||||
|
||||
# For projects that build the same source file twice into different object
|
||||
# files, the pgcc approach of using the *source* file root name can cause
|
||||
# problems in parallel builds. Use a locking strategy to avoid stomping on
|
||||
# the same $tmpdepfile.
|
||||
lockdir=$base.d-lock
|
||||
trap "
|
||||
echo '$0: caught signal, cleaning up...' >&2
|
||||
rmdir '$lockdir'
|
||||
exit 1
|
||||
" 1 2 13 15
|
||||
numtries=100
|
||||
i=$numtries
|
||||
while test $i -gt 0; do
|
||||
# mkdir is a portable test-and-set.
|
||||
if mkdir "$lockdir" 2>/dev/null; then
|
||||
# This process acquired the lock.
|
||||
"$@" -MD
|
||||
stat=$?
|
||||
# Release the lock.
|
||||
rmdir "$lockdir"
|
||||
break
|
||||
else
|
||||
# If the lock is being held by a different process, wait
|
||||
# until the winning process is done or we timeout.
|
||||
while test -d "$lockdir" && test $i -gt 0; do
|
||||
sleep 1
|
||||
i=`expr $i - 1`
|
||||
done
|
||||
fi
|
||||
i=`expr $i - 1`
|
||||
done
|
||||
trap - 1 2 13 15
|
||||
if test $i -le 0; then
|
||||
echo "$0: failed to acquire lock after $numtries attempts" >&2
|
||||
echo "$0: check lockdir '$lockdir'" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each line is of the form `foo.o: dependent.h',
|
||||
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp2)
|
||||
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
|
||||
# compilers, which have integrated preprocessors. The correct option
|
||||
# to use with these is +Maked; it writes dependencies to a file named
|
||||
# 'foo.d', which lands next to the object file, wherever that
|
||||
# happens to be.
|
||||
# Much of this is similar to the tru64 case; see comments there.
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir.libs/$base.d
|
||||
"$@" -Wc,+Maked
|
||||
else
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
"$@" +Maked
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
|
||||
# Add 'dependent.h:' lines.
|
||||
sed -ne '2,${
|
||||
s/^ *//
|
||||
s/ \\*$//
|
||||
s/$/:/
|
||||
p
|
||||
}' "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
make_dummy_depfile
|
||||
fi
|
||||
rm -f "$tmpdepfile" "$tmpdepfile2"
|
||||
;;
|
||||
|
||||
tru64)
|
||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||
# effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
|
||||
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||
# dependencies in 'foo.d' instead, so we check for that too.
|
||||
# Subdirectories are respected.
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
|
||||
if test "$libtool" = yes; then
|
||||
# Libtool generates 2 separate objects for the 2 libraries. These
|
||||
# two compilations output dependencies in $dir.libs/$base.o.d and
|
||||
# in $dir$base.o.d. We have to check for both files, because
|
||||
# one of the two compilations can be disabled. We should prefer
|
||||
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
|
||||
# automatically cleaned when .libs/ is deleted, while ignoring
|
||||
# the former would cause a distcleancheck panic.
|
||||
tmpdepfile1=$dir$base.o.d # libtool 1.5
|
||||
tmpdepfile2=$dir.libs/$base.o.d # Likewise.
|
||||
tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
tmpdepfile3=$dir$base.d
|
||||
"$@" -MD
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
# Same post-processing that is required for AIX mode.
|
||||
aix_post_process_depfile
|
||||
;;
|
||||
|
||||
msvc7)
|
||||
if test "$libtool" = yes; then
|
||||
showIncludes=-Wc,-showIncludes
|
||||
else
|
||||
showIncludes=-showIncludes
|
||||
fi
|
||||
"$@" $showIncludes > "$tmpdepfile"
|
||||
stat=$?
|
||||
grep -v '^Note: including file: ' "$tmpdepfile"
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
# The first sed program below extracts the file names and escapes
|
||||
# backslashes for cygpath. The second sed program outputs the file
|
||||
# name when reading, but also accumulates all include files in the
|
||||
# hold buffer in order to output them again at the end. This only
|
||||
# works with sed implementations that can handle large buffers.
|
||||
sed < "$tmpdepfile" -n '
|
||||
/^Note: including file: *\(.*\)/ {
|
||||
s//\1/
|
||||
s/\\/\\\\/g
|
||||
p
|
||||
}' | $cygpath_u | sort -u | sed -n '
|
||||
s/ /\\ /g
|
||||
s/\(.*\)/'"$tab"'\1 \\/p
|
||||
s/.\(.*\) \\/\1:/
|
||||
H
|
||||
$ {
|
||||
s/.*/'"$tab"'/
|
||||
G
|
||||
p
|
||||
}' >> "$depfile"
|
||||
echo >> "$depfile" # make sure the fragment doesn't end with a backslash
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvc7msys)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
#nosideeffect)
|
||||
# This comment above is used by automake to tell side-effect
|
||||
# dependency tracking mechanisms from slower ones.
|
||||
|
||||
dashmstdout)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout, regardless of -o.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove '-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
test -z "$dashmflag" && dashmflag=-M
|
||||
# Require at least two characters before searching for ':'
|
||||
# in the target name. This is to cope with DOS-style filenames:
|
||||
# a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
|
||||
"$@" $dashmflag |
|
||||
sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this sed invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
dashXmstdout)
|
||||
# This case only exists to satisfy depend.m4. It is never actually
|
||||
# run, as this mode is specially recognized in the preamble.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
makedepend)
|
||||
"$@" || exit $?
|
||||
# Remove any Libtool call
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
# X makedepend
|
||||
shift
|
||||
cleared=no eat=no
|
||||
for arg
|
||||
do
|
||||
case $cleared in
|
||||
no)
|
||||
set ""; shift
|
||||
cleared=yes ;;
|
||||
esac
|
||||
if test $eat = yes; then
|
||||
eat=no
|
||||
continue
|
||||
fi
|
||||
case "$arg" in
|
||||
-D*|-I*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
# Strip any option that makedepend may not understand. Remove
|
||||
# the object too, otherwise makedepend will parse it as a source file.
|
||||
-arch)
|
||||
eat=yes ;;
|
||||
-*|$object)
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
esac
|
||||
done
|
||||
obj_suffix=`echo "$object" | sed 's/^.*\././'`
|
||||
touch "$tmpdepfile"
|
||||
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||
rm -f "$depfile"
|
||||
# makedepend may prepend the VPATH from the source file name to the object.
|
||||
# No need to regex-escape $object, excess matching of '.' is harmless.
|
||||
sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process the last invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed '1,2d' "$tmpdepfile" \
|
||||
| tr ' ' "$nl" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||
;;
|
||||
|
||||
cpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove '-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
"$@" -E \
|
||||
| sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
| sed '$ s: \\$::' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
cat < "$tmpdepfile" >> "$depfile"
|
||||
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvisualcpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case "$arg" in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||
set fnord "$@"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
"$@" -E 2>/dev/null |
|
||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
|
||||
echo "$tab" >> "$depfile"
|
||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvcmsys)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
none)
|
||||
exec "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unknown depmode $depmode" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
1
libcgroup-0.41/dist/Makefile.am
vendored
Normal file
1
libcgroup-0.41/dist/Makefile.am
vendored
Normal file
@ -0,0 +1 @@
|
||||
EXTRA_DIST = libcgroup.spec
|
437
libcgroup-0.41/dist/Makefile.in
vendored
Normal file
437
libcgroup-0.41/dist/Makefile.in
vendored
Normal file
@ -0,0 +1,437 @@
|
||||
# Makefile.in generated by automake 1.13.4 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
VPATH = @srcdir@
|
||||
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = dist
|
||||
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
|
||||
$(srcdir)/libcgroup.spec.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES = libcgroup.spec
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
FGREP = @FGREP@
|
||||
GREP = @GREP@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LEX = @LEX@
|
||||
LEXLIB = @LEXLIB@
|
||||
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBRARY_VERSION_MAJOR = @LIBRARY_VERSION_MAJOR@
|
||||
LIBRARY_VERSION_MINOR = @LIBRARY_VERSION_MINOR@
|
||||
LIBRARY_VERSION_RELEASE = @LIBRARY_VERSION_RELEASE@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
REALLY_YACC = @REALLY_YACC@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
YACC = @YACC@
|
||||
YFLAGS = @YFLAGS@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pamlibdir = @pamlibdir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
EXTRA_DIST = libcgroup.spec
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign dist/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign dist/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
libcgroup.spec: $(top_builddir)/config.status $(srcdir)/libcgroup.spec.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
tags TAGS:
|
||||
|
||||
ctags CTAGS:
|
||||
|
||||
cscope cscopelist:
|
||||
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile
|
||||
installdirs:
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am:
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
|
||||
cscopelist-am ctags-am distclean distclean-generic \
|
||||
distclean-libtool distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-dvi \
|
||||
install-dvi-am install-exec install-exec-am install-html \
|
||||
install-html-am install-info install-info-am install-man \
|
||||
install-pdf install-pdf-am install-ps install-ps-am \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
tags-am uninstall uninstall-am
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
169
libcgroup-0.41/dist/libcgroup.spec
vendored
Normal file
169
libcgroup-0.41/dist/libcgroup.spec
vendored
Normal file
@ -0,0 +1,169 @@
|
||||
%define soversion 1.0.41
|
||||
%define soversion_major 1
|
||||
|
||||
Name: libcgroup
|
||||
Summary: Tools and libraries to control and monitor control groups
|
||||
Group: System Environment/Libraries
|
||||
Version: 0.41
|
||||
Release: 1%{?dist}
|
||||
License: LGPLv2+
|
||||
URL: http://libcg.sourceforge.net/
|
||||
Source0: http://downloads.sourceforge.net/libcg/%{name}-%{version}.tar.bz2
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: pam-devel
|
||||
BuildRequires: byacc
|
||||
BuildRequires: flex
|
||||
BuildRequires: coreutils
|
||||
Requires(pre): shadow-utils
|
||||
Requires(post): chkconfig, /sbin/service
|
||||
Requires(preun): /sbin/chkconfig
|
||||
|
||||
%description
|
||||
Control groups infrastructure. The tools and library help manipulate, control,
|
||||
administrate and monitor control groups and the associated controllers.
|
||||
|
||||
%package pam
|
||||
Summary: A Pluggable Authentication Module for libcgroup
|
||||
Group: System Environment/Base
|
||||
Requires: libcgroup = %{version}-%{release}
|
||||
|
||||
%description pam
|
||||
Linux-PAM module, which allows administrators to classify the user's login
|
||||
processes to pre-configured control group.
|
||||
|
||||
%package devel
|
||||
Summary: Development libraries to develop applications that utilize control groups
|
||||
Group: Development/Libraries
|
||||
Requires: libcgroup = %{version}-%{release}
|
||||
|
||||
%description devel
|
||||
It provides API to create/delete and modify cgroup nodes. It will also in the
|
||||
future allow creation of persistent configuration for control groups and
|
||||
provide scripts to manage that configuration.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
%configure --bindir=/bin --sbindir=/sbin --libdir=%{_libdir} --enable-initscript-install --enable-pam-module-dir=/%{_lib}/security
|
||||
|
||||
make %{?_smp_mflags}
|
||||
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
make DESTDIR=$RPM_BUILD_ROOT install
|
||||
|
||||
# install config files
|
||||
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig
|
||||
cp samples/cgred.conf $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/cgred.conf
|
||||
cp samples/cgconfig.sysconfig $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/cgconfig
|
||||
cp samples/cgconfig.conf $RPM_BUILD_ROOT/%{_sysconfdir}/cgconfig.conf
|
||||
cp samples/cgrules.conf $RPM_BUILD_ROOT/%{_sysconfdir}/cgrules.conf
|
||||
cp samples/cgsnapshot_blacklist.conf $RPM_BUILD_ROOT/%{_sysconfdir}/cgsnapshot_blacklist.conf
|
||||
|
||||
# sanitize pam module, we need only pam_cgroup.so
|
||||
mv -f $RPM_BUILD_ROOT/%{_lib}/security/pam_cgroup.so.*.*.* $RPM_BUILD_ROOT/%{_lib}/security/pam_cgroup.so
|
||||
rm -f $RPM_BUILD_ROOT/%{_lib}/security/pam_cgroup.la $RPM_BUILD_ROOT/%{_lib}/security/pam_cgroup.so.*
|
||||
|
||||
# move the libraries to /
|
||||
mkdir -p $RPM_BUILD_ROOT/%{_lib}
|
||||
mv -f $RPM_BUILD_ROOT/%{_libdir}/libcgroup.so.%{soversion} $RPM_BUILD_ROOT/%{_lib}
|
||||
rm -f $RPM_BUILD_ROOT/%{_libdir}/libcgroup.so.%{soversion_major}
|
||||
ln -sf libcgroup.so.%{soversion} $RPM_BUILD_ROOT/%{_lib}/libcgroup.so.%{soversion_major}
|
||||
ln -sf ../../%{_lib}/libcgroup.so.%{soversion} $RPM_BUILD_ROOT/%{_libdir}/libcgroup.so
|
||||
rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%pre
|
||||
getent group cgred >/dev/null || groupadd cgred
|
||||
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
/sbin/chkconfig --add cgred
|
||||
/sbin/chkconfig --add cgconfig
|
||||
|
||||
%preun
|
||||
if [ $1 = 0 ]; then
|
||||
/sbin/service cgred stop > /dev/null 2>&1 || :
|
||||
/sbin/service cgconfig stop > /dev/null 2>&1 || :
|
||||
/sbin/chkconfig --del cgconfig
|
||||
/sbin/chkconfig --del cgred
|
||||
fi
|
||||
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%config(noreplace) %{_sysconfdir}/sysconfig/cgred.conf
|
||||
%config(noreplace) %{_sysconfdir}/sysconfig/cgconfig
|
||||
%config(noreplace) %{_sysconfdir}/cgconfig.conf
|
||||
%config(noreplace) %{_sysconfdir}/cgrules.conf
|
||||
%config(noreplace) %{_sysconfdir}/cgsnapshot_blacklist.conf
|
||||
/%{_lib}/libcgroup.so.*
|
||||
%attr(2755, root, cgred) /bin/cgexec
|
||||
/bin/cgclassify
|
||||
/bin/cgcreate
|
||||
/bin/cgget
|
||||
/bin/cgset
|
||||
/bin/cgdelete
|
||||
/bin/lscgroup
|
||||
/bin/lssubsys
|
||||
/sbin/cgconfigparser
|
||||
/sbin/cgrulesengd
|
||||
/sbin/cgclear
|
||||
/bin/cgsnapshot
|
||||
%attr(0644, root, root) %{_mandir}/man1/*
|
||||
%attr(0644, root, root) %{_mandir}/man5/*
|
||||
%attr(0644, root, root) %{_mandir}/man8/*
|
||||
%attr(0755,root,root) %{_initrddir}/cgconfig
|
||||
%attr(0755,root,root) %{_initrddir}/cgred
|
||||
|
||||
%doc COPYING INSTALL README_daemon
|
||||
|
||||
%files pam
|
||||
%defattr(-,root,root,-)
|
||||
%attr(0755,root,root) /%{_lib}/security/pam_cgroup.so
|
||||
%doc COPYING INSTALL
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root,-)
|
||||
%{_includedir}/libcgroup.h
|
||||
%{_includedir}/libcgroup/*.h
|
||||
%{_libdir}/libcgroup.*
|
||||
/%{_libdir}/pkgconfig/libcgroup.pc
|
||||
%doc COPYING INSTALL
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Nov 2 2010 Jan Safranek <jsafrane@redhat.com> 0.37.rc1-1
|
||||
- Add cgsnapshot
|
||||
* Thu Feb 18 2010 Dhaval Giani <dhaval.giani@gmail.com> 0.36.rc1-1
|
||||
- Add pkgconfig file
|
||||
* Tue Jan 19 2010 Balbir Singh <balbir@linux.vnet.ibm.com> 0.35.1
|
||||
- Integrate Jan's fixes for distributing cgget and initscripts
|
||||
* Thu Oct 22 2009 Jan Safranek <jsafrane@redhat.com> 0.34-1
|
||||
- Update to latest upstream
|
||||
- Split PAM module to separate subpackage
|
||||
* Tue Feb 24 2009 Balbir Singh <balbir@linux.vnet.ibm.com> 0.33-1
|
||||
- Update to 0.33, spec file changes to add Makefiles and pam_cgroup module
|
||||
* Fri Oct 10 2008 Dhaval Giani <dhaval@linux.vnet.ibm.com> 0.32-1
|
||||
- Update to latest upstream
|
||||
* Thu Sep 11 2008 Dhaval Giani <dhaval@linux-vnet.ibm.com> 0.31-1
|
||||
- Update to latest upstream
|
||||
* Sat Aug 2 2008 Dhaval Giani <dhaval@linux.vnet.ibm.com> 0.1c-3
|
||||
- Change release to fix broken upgrade path
|
||||
* Wed Jun 11 2008 Dhaval Giani <dhaval@linux.vnet.ibm.com> 0.1c-1
|
||||
- Update to latest upstream version
|
||||
* Tue Jun 3 2008 Balbir Singh <balbir@linux.vnet.ibm.com> 0.1b-3
|
||||
- Add post and postun. Also fix Requires for devel to depend on base n-v-r
|
||||
* Sat May 31 2008 Balbir Singh <balbir@linux.vnet.ibm.com> 0.1b-2
|
||||
- Fix makeinstall, Source0 and URL (review comments from Tom)
|
||||
* Mon May 26 2008 Balbir Singh <balbir@linux.vnet.ibm.com> 0.1b-1
|
||||
- Add a generatable spec file
|
||||
* Tue May 20 2008 Balbir Singh <balbir@linux.vnet.ibm.com> 0.1-1
|
||||
- Get the spec file to work
|
||||
* Tue May 20 2008 Dhaval Giani <dhaval@linux.vnet.ibm.com> 0.01-1
|
||||
- The first version of libcg
|
169
libcgroup-0.41/dist/libcgroup.spec.in
vendored
Normal file
169
libcgroup-0.41/dist/libcgroup.spec.in
vendored
Normal file
@ -0,0 +1,169 @@
|
||||
%define soversion @LIBRARY_VERSION_MAJOR@.@LIBRARY_VERSION_MINOR@.@LIBRARY_VERSION_RELEASE@
|
||||
%define soversion_major @LIBRARY_VERSION_MAJOR@
|
||||
|
||||
Name: libcgroup
|
||||
Summary: Tools and libraries to control and monitor control groups
|
||||
Group: System Environment/Libraries
|
||||
Version: @PACKAGE_VERSION@
|
||||
Release: 1%{?dist}
|
||||
License: LGPLv2+
|
||||
URL: http://libcg.sourceforge.net/
|
||||
Source0: http://downloads.sourceforge.net/libcg/%{name}-%{version}.tar.bz2
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: pam-devel
|
||||
BuildRequires: byacc
|
||||
BuildRequires: flex
|
||||
BuildRequires: coreutils
|
||||
Requires(pre): shadow-utils
|
||||
Requires(post): chkconfig, /sbin/service
|
||||
Requires(preun): /sbin/chkconfig
|
||||
|
||||
%description
|
||||
Control groups infrastructure. The tools and library help manipulate, control,
|
||||
administrate and monitor control groups and the associated controllers.
|
||||
|
||||
%package pam
|
||||
Summary: A Pluggable Authentication Module for libcgroup
|
||||
Group: System Environment/Base
|
||||
Requires: libcgroup = %{version}-%{release}
|
||||
|
||||
%description pam
|
||||
Linux-PAM module, which allows administrators to classify the user's login
|
||||
processes to pre-configured control group.
|
||||
|
||||
%package devel
|
||||
Summary: Development libraries to develop applications that utilize control groups
|
||||
Group: Development/Libraries
|
||||
Requires: libcgroup = %{version}-%{release}
|
||||
|
||||
%description devel
|
||||
It provides API to create/delete and modify cgroup nodes. It will also in the
|
||||
future allow creation of persistent configuration for control groups and
|
||||
provide scripts to manage that configuration.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
%configure --bindir=/bin --sbindir=/sbin --libdir=%{_libdir} --enable-initscript-install --enable-pam-module-dir=/%{_lib}/security
|
||||
|
||||
make %{?_smp_mflags}
|
||||
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
make DESTDIR=$RPM_BUILD_ROOT install
|
||||
|
||||
# install config files
|
||||
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig
|
||||
cp samples/cgred.conf $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/cgred.conf
|
||||
cp samples/cgconfig.sysconfig $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/cgconfig
|
||||
cp samples/cgconfig.conf $RPM_BUILD_ROOT/%{_sysconfdir}/cgconfig.conf
|
||||
cp samples/cgrules.conf $RPM_BUILD_ROOT/%{_sysconfdir}/cgrules.conf
|
||||
cp samples/cgsnapshot_blacklist.conf $RPM_BUILD_ROOT/%{_sysconfdir}/cgsnapshot_blacklist.conf
|
||||
|
||||
# sanitize pam module, we need only pam_cgroup.so
|
||||
mv -f $RPM_BUILD_ROOT/%{_lib}/security/pam_cgroup.so.*.*.* $RPM_BUILD_ROOT/%{_lib}/security/pam_cgroup.so
|
||||
rm -f $RPM_BUILD_ROOT/%{_lib}/security/pam_cgroup.la $RPM_BUILD_ROOT/%{_lib}/security/pam_cgroup.so.*
|
||||
|
||||
# move the libraries to /
|
||||
mkdir -p $RPM_BUILD_ROOT/%{_lib}
|
||||
mv -f $RPM_BUILD_ROOT/%{_libdir}/libcgroup.so.%{soversion} $RPM_BUILD_ROOT/%{_lib}
|
||||
rm -f $RPM_BUILD_ROOT/%{_libdir}/libcgroup.so.%{soversion_major}
|
||||
ln -sf libcgroup.so.%{soversion} $RPM_BUILD_ROOT/%{_lib}/libcgroup.so.%{soversion_major}
|
||||
ln -sf ../../%{_lib}/libcgroup.so.%{soversion} $RPM_BUILD_ROOT/%{_libdir}/libcgroup.so
|
||||
rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%pre
|
||||
getent group cgred >/dev/null || groupadd cgred
|
||||
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
/sbin/chkconfig --add cgred
|
||||
/sbin/chkconfig --add cgconfig
|
||||
|
||||
%preun
|
||||
if [ $1 = 0 ]; then
|
||||
/sbin/service cgred stop > /dev/null 2>&1 || :
|
||||
/sbin/service cgconfig stop > /dev/null 2>&1 || :
|
||||
/sbin/chkconfig --del cgconfig
|
||||
/sbin/chkconfig --del cgred
|
||||
fi
|
||||
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%config(noreplace) %{_sysconfdir}/sysconfig/cgred.conf
|
||||
%config(noreplace) %{_sysconfdir}/sysconfig/cgconfig
|
||||
%config(noreplace) %{_sysconfdir}/cgconfig.conf
|
||||
%config(noreplace) %{_sysconfdir}/cgrules.conf
|
||||
%config(noreplace) %{_sysconfdir}/cgsnapshot_blacklist.conf
|
||||
/%{_lib}/libcgroup.so.*
|
||||
%attr(2755, root, cgred) /bin/cgexec
|
||||
/bin/cgclassify
|
||||
/bin/cgcreate
|
||||
/bin/cgget
|
||||
/bin/cgset
|
||||
/bin/cgdelete
|
||||
/bin/lscgroup
|
||||
/bin/lssubsys
|
||||
/sbin/cgconfigparser
|
||||
/sbin/cgrulesengd
|
||||
/sbin/cgclear
|
||||
/bin/cgsnapshot
|
||||
%attr(0644, root, root) %{_mandir}/man1/*
|
||||
%attr(0644, root, root) %{_mandir}/man5/*
|
||||
%attr(0644, root, root) %{_mandir}/man8/*
|
||||
%attr(0755,root,root) %{_initrddir}/cgconfig
|
||||
%attr(0755,root,root) %{_initrddir}/cgred
|
||||
|
||||
%doc COPYING INSTALL README_daemon
|
||||
|
||||
%files pam
|
||||
%defattr(-,root,root,-)
|
||||
%attr(0755,root,root) /%{_lib}/security/pam_cgroup.so
|
||||
%doc COPYING INSTALL
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root,-)
|
||||
%{_includedir}/libcgroup.h
|
||||
%{_includedir}/libcgroup/*.h
|
||||
%{_libdir}/libcgroup.*
|
||||
/%{_libdir}/pkgconfig/libcgroup.pc
|
||||
%doc COPYING INSTALL
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Nov 2 2010 Jan Safranek <jsafrane@redhat.com> 0.37.rc1-1
|
||||
- Add cgsnapshot
|
||||
* Thu Feb 18 2010 Dhaval Giani <dhaval.giani@gmail.com> 0.36.rc1-1
|
||||
- Add pkgconfig file
|
||||
* Tue Jan 19 2010 Balbir Singh <balbir@linux.vnet.ibm.com> 0.35.1
|
||||
- Integrate Jan's fixes for distributing cgget and initscripts
|
||||
* Thu Oct 22 2009 Jan Safranek <jsafrane@redhat.com> 0.34-1
|
||||
- Update to latest upstream
|
||||
- Split PAM module to separate subpackage
|
||||
* Tue Feb 24 2009 Balbir Singh <balbir@linux.vnet.ibm.com> 0.33-1
|
||||
- Update to 0.33, spec file changes to add Makefiles and pam_cgroup module
|
||||
* Fri Oct 10 2008 Dhaval Giani <dhaval@linux.vnet.ibm.com> 0.32-1
|
||||
- Update to latest upstream
|
||||
* Thu Sep 11 2008 Dhaval Giani <dhaval@linux-vnet.ibm.com> 0.31-1
|
||||
- Update to latest upstream
|
||||
* Sat Aug 2 2008 Dhaval Giani <dhaval@linux.vnet.ibm.com> 0.1c-3
|
||||
- Change release to fix broken upgrade path
|
||||
* Wed Jun 11 2008 Dhaval Giani <dhaval@linux.vnet.ibm.com> 0.1c-1
|
||||
- Update to latest upstream version
|
||||
* Tue Jun 3 2008 Balbir Singh <balbir@linux.vnet.ibm.com> 0.1b-3
|
||||
- Add post and postun. Also fix Requires for devel to depend on base n-v-r
|
||||
* Sat May 31 2008 Balbir Singh <balbir@linux.vnet.ibm.com> 0.1b-2
|
||||
- Fix makeinstall, Source0 and URL (review comments from Tom)
|
||||
* Mon May 26 2008 Balbir Singh <balbir@linux.vnet.ibm.com> 0.1b-1
|
||||
- Add a generatable spec file
|
||||
* Tue May 20 2008 Balbir Singh <balbir@linux.vnet.ibm.com> 0.1-1
|
||||
- Get the spec file to work
|
||||
* Tue May 20 2008 Dhaval Giani <dhaval@linux.vnet.ibm.com> 0.01-1
|
||||
- The first version of libcg
|
2
libcgroup-0.41/doc/Makefile.am
Normal file
2
libcgroup-0.41/doc/Makefile.am
Normal file
@ -0,0 +1,2 @@
|
||||
SUBDIRS = man
|
||||
|
614
libcgroup-0.41/doc/Makefile.in
Normal file
614
libcgroup-0.41/doc/Makefile.in
Normal file
@ -0,0 +1,614 @@
|
||||
# Makefile.in generated by automake 1.13.4 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
VPATH = @srcdir@
|
||||
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = doc
|
||||
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
|
||||
ctags-recursive dvi-recursive html-recursive info-recursive \
|
||||
install-data-recursive install-dvi-recursive \
|
||||
install-exec-recursive install-html-recursive \
|
||||
install-info-recursive install-pdf-recursive \
|
||||
install-ps-recursive install-recursive installcheck-recursive \
|
||||
installdirs-recursive pdf-recursive ps-recursive \
|
||||
tags-recursive uninstall-recursive
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
|
||||
distclean-recursive maintainer-clean-recursive
|
||||
am__recursive_targets = \
|
||||
$(RECURSIVE_TARGETS) \
|
||||
$(RECURSIVE_CLEAN_TARGETS) \
|
||||
$(am__extra_recursive_targets)
|
||||
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
|
||||
distdir
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
# Read a list of newline-separated strings from the standard input,
|
||||
# and print each of them once, without duplicates. Input order is
|
||||
# *not* preserved.
|
||||
am__uniquify_input = $(AWK) '\
|
||||
BEGIN { nonempty = 0; } \
|
||||
{ items[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in items) print i; }; } \
|
||||
'
|
||||
# Make sure the list of sources is unique. This is necessary because,
|
||||
# e.g., the same source file might be shared among _SOURCES variables
|
||||
# for different programs/libraries.
|
||||
am__define_uniq_tagged_files = \
|
||||
list='$(am__tagged_files)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | $(am__uniquify_input)`
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
am__relativize = \
|
||||
dir0=`pwd`; \
|
||||
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
|
||||
sed_rest='s,^[^/]*/*,,'; \
|
||||
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
|
||||
sed_butlast='s,/*[^/]*$$,,'; \
|
||||
while test -n "$$dir1"; do \
|
||||
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
|
||||
if test "$$first" != "."; then \
|
||||
if test "$$first" = ".."; then \
|
||||
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
|
||||
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
|
||||
else \
|
||||
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
|
||||
if test "$$first2" = "$$first"; then \
|
||||
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
|
||||
else \
|
||||
dir2="../$$dir2"; \
|
||||
fi; \
|
||||
dir0="$$dir0"/"$$first"; \
|
||||
fi; \
|
||||
fi; \
|
||||
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
|
||||
done; \
|
||||
reldir="$$dir2"
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
FGREP = @FGREP@
|
||||
GREP = @GREP@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LEX = @LEX@
|
||||
LEXLIB = @LEXLIB@
|
||||
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBRARY_VERSION_MAJOR = @LIBRARY_VERSION_MAJOR@
|
||||
LIBRARY_VERSION_MINOR = @LIBRARY_VERSION_MINOR@
|
||||
LIBRARY_VERSION_RELEASE = @LIBRARY_VERSION_RELEASE@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
REALLY_YACC = @REALLY_YACC@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
YACC = @YACC@
|
||||
YFLAGS = @YFLAGS@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pamlibdir = @pamlibdir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
SUBDIRS = man
|
||||
all: all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign doc/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run 'make' without going through this Makefile.
|
||||
# To change the values of 'make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in 'config.status', edit 'config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run 'make');
|
||||
# (2) otherwise, pass the desired values on the 'make' command line.
|
||||
$(am__recursive_targets):
|
||||
@fail=; \
|
||||
if $(am__make_keepgoing); then \
|
||||
failcom='fail=yes'; \
|
||||
else \
|
||||
failcom='exit 1'; \
|
||||
fi; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
ID: $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); mkid -fID $$unique
|
||||
tags: tags-recursive
|
||||
TAGS: tags
|
||||
|
||||
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
empty_fix=.; \
|
||||
else \
|
||||
include_option=--include; \
|
||||
empty_fix=; \
|
||||
fi; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test ! -f $$subdir/TAGS || \
|
||||
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
$(am__define_uniq_tagged_files); \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: ctags-recursive
|
||||
|
||||
CTAGS: ctags
|
||||
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
cscopelist: cscopelist-recursive
|
||||
|
||||
cscopelist-am: $(am__tagged_files)
|
||||
list='$(am__tagged_files)'; \
|
||||
case "$(srcdir)" in \
|
||||
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
||||
*) sdir=$(subdir)/$(srcdir) ;; \
|
||||
esac; \
|
||||
for i in $$list; do \
|
||||
if test -f "$$i"; then \
|
||||
echo "$(subdir)/$$i"; \
|
||||
else \
|
||||
echo "$$sdir/$$i"; \
|
||||
fi; \
|
||||
done >> $(top_builddir)/cscope.files
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
$(am__make_dryrun) \
|
||||
|| test -d "$(distdir)/$$subdir" \
|
||||
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
|
||||
$(am__relativize); \
|
||||
new_distdir=$$reldir; \
|
||||
dir1=$$subdir; dir2="$(top_distdir)"; \
|
||||
$(am__relativize); \
|
||||
new_top_distdir=$$reldir; \
|
||||
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
|
||||
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
|
||||
($(am__cd) $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$$new_top_distdir" \
|
||||
distdir="$$new_distdir" \
|
||||
am__remove_distdir=: \
|
||||
am__skip_length_check=: \
|
||||
am__skip_mode_fix=: \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
all-am: Makefile
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
install-data: install-data-recursive
|
||||
uninstall: uninstall-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-recursive
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-tags
|
||||
|
||||
dvi: dvi-recursive
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-recursive
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-recursive
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-recursive
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-recursive
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-recursive
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-recursive
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-recursive
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am:
|
||||
|
||||
.MAKE: $(am__recursive_targets) install-am install-strip
|
||||
|
||||
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
|
||||
check-am clean clean-generic clean-libtool cscopelist-am ctags \
|
||||
ctags-am distclean distclean-generic distclean-libtool \
|
||||
distclean-tags distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-dvi \
|
||||
install-dvi-am install-exec install-exec-am install-html \
|
||||
install-html-am install-info install-info-am install-man \
|
||||
install-pdf install-pdf-am install-ps install-ps-am \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
installdirs-am maintainer-clean maintainer-clean-generic \
|
||||
mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
|
||||
ps ps-am tags tags-am uninstall uninstall-am
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
6
libcgroup-0.41/doc/man/Makefile.am
Normal file
6
libcgroup-0.41/doc/man/Makefile.am
Normal file
@ -0,0 +1,6 @@
|
||||
man_MANS = cgclassify.1 cgconfig.conf.5 cgconfigparser.8 cgexec.1 cgred.conf.5 \
|
||||
cgrules.conf.5 cgrulesengd.8 cgcreate.1 cgset.1 cgclear.1 cgget.1 \
|
||||
cgdelete.1 lssubsys.1 lscgroup.1 cgsnapshot.1
|
||||
|
||||
EXTRA_DIST = $(man_MANS)
|
||||
|
608
libcgroup-0.41/doc/man/Makefile.in
Normal file
608
libcgroup-0.41/doc/man/Makefile.in
Normal file
@ -0,0 +1,608 @@
|
||||
# Makefile.in generated by automake 1.13.4 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
VPATH = @srcdir@
|
||||
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = doc/man
|
||||
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||
am__install_max = 40
|
||||
am__nobase_strip_setup = \
|
||||
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||
am__nobase_strip = \
|
||||
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||
am__nobase_list = $(am__nobase_strip_setup); \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||
if (++n[$$2] == $(am__install_max)) \
|
||||
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||
END { for (dir in files) print dir, files[dir] }'
|
||||
am__base_list = \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||
am__uninstall_files_from_dir = { \
|
||||
test -z "$$files" \
|
||||
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|
||||
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
|
||||
$(am__cd) "$$dir" && rm -f $$files; }; \
|
||||
}
|
||||
man1dir = $(mandir)/man1
|
||||
am__installdirs = "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man5dir)" \
|
||||
"$(DESTDIR)$(man8dir)"
|
||||
man5dir = $(mandir)/man5
|
||||
man8dir = $(mandir)/man8
|
||||
NROFF = nroff
|
||||
MANS = $(man_MANS)
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
FGREP = @FGREP@
|
||||
GREP = @GREP@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LEX = @LEX@
|
||||
LEXLIB = @LEXLIB@
|
||||
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBRARY_VERSION_MAJOR = @LIBRARY_VERSION_MAJOR@
|
||||
LIBRARY_VERSION_MINOR = @LIBRARY_VERSION_MINOR@
|
||||
LIBRARY_VERSION_RELEASE = @LIBRARY_VERSION_RELEASE@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
REALLY_YACC = @REALLY_YACC@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
YACC = @YACC@
|
||||
YFLAGS = @YFLAGS@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pamlibdir = @pamlibdir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
man_MANS = cgclassify.1 cgconfig.conf.5 cgconfigparser.8 cgexec.1 cgred.conf.5 \
|
||||
cgrules.conf.5 cgrulesengd.8 cgcreate.1 cgset.1 cgclear.1 cgget.1 \
|
||||
cgdelete.1 lssubsys.1 lscgroup.1 cgsnapshot.1
|
||||
|
||||
EXTRA_DIST = $(man_MANS)
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/man/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign doc/man/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
install-man1: $(man_MANS)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list1=''; \
|
||||
list2='$(man_MANS)'; \
|
||||
test -n "$(man1dir)" \
|
||||
&& test -n "`echo $$list1$$list2`" \
|
||||
|| exit 0; \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \
|
||||
{ for i in $$list1; do echo "$$i"; done; \
|
||||
if test -n "$$list2"; then \
|
||||
for i in $$list2; do echo "$$i"; done \
|
||||
| sed -n '/\.1[a-z]*$$/p'; \
|
||||
fi; \
|
||||
} | while read p; do \
|
||||
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; echo "$$p"; \
|
||||
done | \
|
||||
sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
|
||||
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
|
||||
sed 'N;N;s,\n, ,g' | { \
|
||||
list=; while read file base inst; do \
|
||||
if test "$$base" = "$$inst"; then list="$$list $$file"; else \
|
||||
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
|
||||
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
|
||||
fi; \
|
||||
done; \
|
||||
for i in $$list; do echo "$$i"; done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
test -z "$$files" || { \
|
||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
|
||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
|
||||
done; }
|
||||
|
||||
uninstall-man1:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list=''; test -n "$(man1dir)" || exit 0; \
|
||||
files=`{ for i in $$list; do echo "$$i"; done; \
|
||||
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
|
||||
sed -n '/\.1[a-z]*$$/p'; \
|
||||
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
|
||||
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
|
||||
dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir)
|
||||
install-man5: $(man_MANS)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list1=''; \
|
||||
list2='$(man_MANS)'; \
|
||||
test -n "$(man5dir)" \
|
||||
&& test -n "`echo $$list1$$list2`" \
|
||||
|| exit 0; \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(man5dir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(man5dir)" || exit 1; \
|
||||
{ for i in $$list1; do echo "$$i"; done; \
|
||||
if test -n "$$list2"; then \
|
||||
for i in $$list2; do echo "$$i"; done \
|
||||
| sed -n '/\.5[a-z]*$$/p'; \
|
||||
fi; \
|
||||
} | while read p; do \
|
||||
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; echo "$$p"; \
|
||||
done | \
|
||||
sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \
|
||||
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
|
||||
sed 'N;N;s,\n, ,g' | { \
|
||||
list=; while read file base inst; do \
|
||||
if test "$$base" = "$$inst"; then list="$$list $$file"; else \
|
||||
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man5dir)/$$inst'"; \
|
||||
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man5dir)/$$inst" || exit $$?; \
|
||||
fi; \
|
||||
done; \
|
||||
for i in $$list; do echo "$$i"; done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
test -z "$$files" || { \
|
||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man5dir)'"; \
|
||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(man5dir)" || exit $$?; }; \
|
||||
done; }
|
||||
|
||||
uninstall-man5:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list=''; test -n "$(man5dir)" || exit 0; \
|
||||
files=`{ for i in $$list; do echo "$$i"; done; \
|
||||
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
|
||||
sed -n '/\.5[a-z]*$$/p'; \
|
||||
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \
|
||||
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
|
||||
dir='$(DESTDIR)$(man5dir)'; $(am__uninstall_files_from_dir)
|
||||
install-man8: $(man_MANS)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list1=''; \
|
||||
list2='$(man_MANS)'; \
|
||||
test -n "$(man8dir)" \
|
||||
&& test -n "`echo $$list1$$list2`" \
|
||||
|| exit 0; \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(man8dir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(man8dir)" || exit 1; \
|
||||
{ for i in $$list1; do echo "$$i"; done; \
|
||||
if test -n "$$list2"; then \
|
||||
for i in $$list2; do echo "$$i"; done \
|
||||
| sed -n '/\.8[a-z]*$$/p'; \
|
||||
fi; \
|
||||
} | while read p; do \
|
||||
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; echo "$$p"; \
|
||||
done | \
|
||||
sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
|
||||
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
|
||||
sed 'N;N;s,\n, ,g' | { \
|
||||
list=; while read file base inst; do \
|
||||
if test "$$base" = "$$inst"; then list="$$list $$file"; else \
|
||||
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \
|
||||
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \
|
||||
fi; \
|
||||
done; \
|
||||
for i in $$list; do echo "$$i"; done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
test -z "$$files" || { \
|
||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \
|
||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \
|
||||
done; }
|
||||
|
||||
uninstall-man8:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list=''; test -n "$(man8dir)" || exit 0; \
|
||||
files=`{ for i in $$list; do echo "$$i"; done; \
|
||||
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
|
||||
sed -n '/\.8[a-z]*$$/p'; \
|
||||
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
|
||||
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
|
||||
dir='$(DESTDIR)$(man8dir)'; $(am__uninstall_files_from_dir)
|
||||
tags TAGS:
|
||||
|
||||
ctags CTAGS:
|
||||
|
||||
cscope cscopelist:
|
||||
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(MANS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man8dir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-man
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man: install-man1 install-man5 install-man8
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-man
|
||||
|
||||
uninstall-man: uninstall-man1 uninstall-man5 uninstall-man8
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
|
||||
cscopelist-am ctags-am distclean distclean-generic \
|
||||
distclean-libtool distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-dvi \
|
||||
install-dvi-am install-exec install-exec-am install-html \
|
||||
install-html-am install-info install-info-am install-man \
|
||||
install-man1 install-man5 install-man8 install-pdf \
|
||||
install-pdf-am install-ps install-ps-am install-strip \
|
||||
installcheck installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-generic \
|
||||
mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \
|
||||
uninstall-am uninstall-man uninstall-man1 uninstall-man5 \
|
||||
uninstall-man8
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
64
libcgroup-0.41/doc/man/cgclassify.1
Normal file
64
libcgroup-0.41/doc/man/cgclassify.1
Normal file
@ -0,0 +1,64 @@
|
||||
.\" Copyright (C) 2009 Red Hat, Inc. All Rights Reserved.
|
||||
.\" Written by Ivana Varekova <varekova@redhat.com>.
|
||||
|
||||
.TH CGCLASSIFY 1 2009-03-15 "Linux" "libcgroup Manual"
|
||||
.SH NAME
|
||||
cgclassify \- move running task(s) to given cgroups
|
||||
|
||||
.SH SYNOPSIS
|
||||
\fBcgclassify\fR [\fB-g\fR <\fIcontrollers>:<path\fR>] [--sticky | --cancel-sticky] <\fIpidlist\fR>
|
||||
|
||||
.SH DESCRIPTION
|
||||
this command moves processes defined by the list
|
||||
of processes
|
||||
(\fBpidlist\fR)
|
||||
to the given control groups.
|
||||
|
||||
The pids in the pidlist are separated by spaces
|
||||
|
||||
.TP
|
||||
.B -g <controllers>:<path>
|
||||
defines the control groups where the task will be moved.
|
||||
\fBcontrollers\fR is a list of controllers and
|
||||
\fBpath\fR is the relative path to control groups
|
||||
in the given controllers list.
|
||||
|
||||
This flag can be used multiple times to
|
||||
define multiple pairs of lists of controllers
|
||||
and relative paths.
|
||||
Instead of the list of all mounted controllers,
|
||||
the wildcard \fB*\fR can be used.
|
||||
|
||||
If this option is not used then
|
||||
\fBcgclassify\fR will automatically move the task to a
|
||||
control group based on \fB/etc/cgrules.conf\fR.
|
||||
|
||||
.TP
|
||||
.B --sticky
|
||||
If this option is used, the daemon of service cgred (cgrulesengd process)
|
||||
does not change both the specified \fBpidlist\fR and their children tasks.
|
||||
Without this option, the daemon does not change the specified \fBpidlist\fR
|
||||
but it automatically changes their child tasks to the right cgroup based on
|
||||
\fB/etc/cgrules.conf\fR.
|
||||
|
||||
.TP
|
||||
.B --cancel-sticky
|
||||
If this option is used, the daemon of service cgred (cgrulesengd process)
|
||||
can automatically change both the specified \fBpidlist\fR and their child
|
||||
tasks to the right cgroup based on \fB/etc/cgrules.conf\fR.
|
||||
|
||||
.SH ENVIRONMENT VARIABLES
|
||||
.TP
|
||||
.B CGROUP_LOGLEVEL
|
||||
controls verbosity of the tool. Allowed values are \fBDEBUG\fR,
|
||||
\fBINFO\fR, \fBWARNING\fR or \fBERROR\fR.
|
||||
|
||||
.SH FILES
|
||||
.TP
|
||||
.B /etc/cgrules.conf
|
||||
default libcgroup configuration file
|
||||
|
||||
|
||||
.SH SEE ALSO
|
||||
cgrules.conf (5), cgexec (1)
|
||||
|
47
libcgroup-0.41/doc/man/cgclear.1
Normal file
47
libcgroup-0.41/doc/man/cgclear.1
Normal file
@ -0,0 +1,47 @@
|
||||
.\" Copyright IBM Corporation. 2009.
|
||||
.\" Written by Dhaval Giani <dhaval@linux.vnet.ibm.com>.
|
||||
|
||||
.TH CGCLEAR 1 2009-10-23 "Linux" "libcgroup Manual"
|
||||
.SH NAME
|
||||
cgclear \- unload the cgroup filesystem
|
||||
|
||||
.SH SYNOPSIS
|
||||
\fBcgclear\fR [\fB-e\fR] [\fB-l\fR <\fIfilename\fR>] [\fB-L\fR <\fIdirectory\fR>] [...]
|
||||
|
||||
.SH DESCRIPTION
|
||||
|
||||
Without parameters, this command moves all the tasks inside the various cgroups
|
||||
to the root cgroup, deletes all the cgroups and finally
|
||||
unmounts the cgroup filesystem from the system.
|
||||
|
||||
If one or more config files are specified, only groups defined in the config
|
||||
files are removed. The files are processed in reverse order, i.e. the last
|
||||
file on command line is processed first, so \fBcgclear\fR can have the same
|
||||
command line arguments as appropriate \fBcgconfigparser\fR.
|
||||
|
||||
.TP
|
||||
.B -l, --load=<filename>
|
||||
specifies the config file to read. This option can be used multiple times and
|
||||
can be mixed with \fB-L\fR option.
|
||||
|
||||
.TP
|
||||
.B -L, --load-directory=<directory>
|
||||
specifies the directory, which is searched for configuration files. All files
|
||||
in this directory will be processed in alphabetical order as they were specified
|
||||
by \fB-l\fR option. This option can be used multiple times and
|
||||
can be mixed with \fB-l\fR option.
|
||||
|
||||
.TP
|
||||
.B -e
|
||||
specifies that only empty groups should be removed. If a group defined in a
|
||||
config file has tasks inside or has a subgroup, it won't be removed. This
|
||||
option works only with \fB-l\fR or \fB-L\fR options.
|
||||
|
||||
.SH ENVIRONMENT VARIABLES
|
||||
.TP
|
||||
.B CGROUP_LOGLEVEL
|
||||
controls verbosity of the tool. Allowed values are \fBDEBUG\fR,
|
||||
\fBINFO\fR, \fBWARNING\fR or \fBERROR\fR.
|
||||
|
||||
.SH SEE ALSO
|
||||
cgconfigparser(1)
|
800
libcgroup-0.41/doc/man/cgconfig.conf.5
Normal file
800
libcgroup-0.41/doc/man/cgconfig.conf.5
Normal file
@ -0,0 +1,800 @@
|
||||
.TH CGCONFIG.CONF 5
|
||||
.\"***********************************
|
||||
.SH NAME
|
||||
cgconfig.conf \- libcgroup configuration file
|
||||
.\"***********************************
|
||||
.SH DESCRIPTION
|
||||
.B "cgconfig.conf"
|
||||
is a configuration file used by
|
||||
.B libcgroup
|
||||
to define control groups, their parameters and their mount points.
|
||||
The file consists of
|
||||
.I mount
|
||||
,
|
||||
.I group
|
||||
and
|
||||
.I default
|
||||
sections. These sections can be in arbitrary order and all of them are
|
||||
optional. Any line starting with '#' is considered a comment line and
|
||||
is ignored.
|
||||
.LP
|
||||
.I mount
|
||||
section has this form:
|
||||
.RS
|
||||
.nf
|
||||
.ft B
|
||||
.sp
|
||||
mount {
|
||||
.RS
|
||||
.ft B
|
||||
<controller> = <path>;
|
||||
.I "..."
|
||||
.RE
|
||||
.ft B
|
||||
}
|
||||
.ft R
|
||||
.fi
|
||||
.RE
|
||||
|
||||
.TP
|
||||
.B controller
|
||||
Name of the kernel subsystem. The list of subsystems supported by the kernel
|
||||
can be found in
|
||||
.I /proc/cgroups
|
||||
file. Named hierarchy can be specified as controller
|
||||
\fB"name=<somename>"\fR. Do not forget to use double quotes around
|
||||
this controller name (see examples below).
|
||||
|
||||
.B Libcgroup
|
||||
merges all subsystems mounted to the same directory (see
|
||||
Example 1) and the directory is mounted only once.
|
||||
|
||||
.TP
|
||||
.B path
|
||||
The directory path where the group hierarchy associated to a given
|
||||
controller shall be mounted. The directory is created
|
||||
automatically on cgconfig service startup if it does not exist and
|
||||
is deleted on service shutdown.
|
||||
.LP
|
||||
|
||||
If no
|
||||
.I mount
|
||||
section is specified, no controllers are mounted.
|
||||
|
||||
.I group
|
||||
section has this form:
|
||||
.RS
|
||||
.nf
|
||||
.ft B
|
||||
.sp
|
||||
group <name> {
|
||||
.RS
|
||||
.ft B
|
||||
[permissions]
|
||||
<controller> {
|
||||
.RS
|
||||
.ft B
|
||||
<param name> = <param value>;
|
||||
.I "..."
|
||||
.RE
|
||||
.ft B
|
||||
}
|
||||
.I "..."
|
||||
.RE
|
||||
.ft B
|
||||
}
|
||||
.ft R
|
||||
.fi
|
||||
.RE
|
||||
|
||||
.TP
|
||||
.B name
|
||||
Name of the control group. It can contain only characters, which are
|
||||
allowed for directory names.
|
||||
The groups form a tree, i.e. a control group can contain zero or more
|
||||
subgroups. Subgroups can be specified using '/' delimiter.
|
||||
|
||||
The root control group is always created automatically in all hierarchies
|
||||
and it is the base of the group hierarchy. It can be explicitly specified in
|
||||
.B cgconfig.conf
|
||||
by using '.' as group name. This can be used e.g. to set its permissions,
|
||||
as shown in Example 6.
|
||||
|
||||
When the parent control group of a subgroup is not specified
|
||||
it is created automatically.
|
||||
|
||||
.TP
|
||||
.B permissions
|
||||
Permissions of the given control group on mounted filesystem.
|
||||
.I root
|
||||
has always permission to do anything with the control group.
|
||||
Permissions have the following syntax:
|
||||
.RS 17
|
||||
.ft B
|
||||
.nf
|
||||
perm {
|
||||
.RS
|
||||
.ft B
|
||||
task {
|
||||
.RS
|
||||
.ft B
|
||||
uid = <task user>;
|
||||
gid = <task group>;
|
||||
fperm = <file permissions>
|
||||
.RE
|
||||
}
|
||||
admin {
|
||||
.RS
|
||||
uid = <admin name>;
|
||||
gid = <admin group>;
|
||||
dperm = <directory permissions>
|
||||
fperm = <file permissions>
|
||||
.RE
|
||||
}
|
||||
.RE
|
||||
}
|
||||
.fi
|
||||
.RE
|
||||
.ft R
|
||||
|
||||
.RS
|
||||
.TP 17
|
||||
.B "task user/group"
|
||||
Name of the user and the group, which own the
|
||||
.I tasks
|
||||
file of the control group. Given fperm then specify the file permissions.
|
||||
Please note that the given value is not used as was specified. Instead,
|
||||
current file owner permissions are used as a "umask" for group and others
|
||||
permissions. For example if fperm = 777 then both group and others will get
|
||||
the same permissions as the file owner.
|
||||
.TP 17
|
||||
.B "admin user/group"
|
||||
Name of the user and the group which own the rest of control group's
|
||||
files. Given fperm and dperm control file and directory permissions.
|
||||
Again, the given value is masked by the file/directory owner permissions.
|
||||
.LP
|
||||
Permissions are only apply to the enclosing control group and are not
|
||||
inherited by subgroups. If there is no
|
||||
.B perm
|
||||
section in the control group definition,
|
||||
.I root:root
|
||||
is the owner of all files and default file permissions are preserved if
|
||||
fperm resp. dperm are not specified.
|
||||
.RE
|
||||
.TP
|
||||
.B controller
|
||||
Name of the kernel subsystem.
|
||||
The section can be
|
||||
empty, default kernel parameters will be used in this case. By
|
||||
specifying
|
||||
.B controller
|
||||
the control group and all its parents are controlled by the specific
|
||||
subsystem. One control group can be controlled by multiple subsystems,
|
||||
even if the subsystems are mounted on different directories. Each
|
||||
control group must be controlled by at least one subsystem, so that
|
||||
.B libcgroup
|
||||
knows in which hierarchies the control group should be created.
|
||||
|
||||
The parameters of the given controller can be modified in the following
|
||||
section enclosed in brackets.
|
||||
.RS
|
||||
.TP
|
||||
.B param name
|
||||
Name of the file to set. Each controller can have zero or more
|
||||
parameters.
|
||||
.TP
|
||||
.B param value
|
||||
Value which should be written to the file when the control group is
|
||||
created. If it is enclosed in double quotes `"', it can contain spaces
|
||||
and other special characters.
|
||||
.RE
|
||||
|
||||
If no
|
||||
.I group
|
||||
section is specified, no groups are created.
|
||||
|
||||
.I default
|
||||
section has this form:
|
||||
.RS
|
||||
.nf
|
||||
.ft B
|
||||
.sp
|
||||
default {
|
||||
.RS
|
||||
.ft B
|
||||
perm {
|
||||
.RS
|
||||
.ft B
|
||||
task {
|
||||
.RS
|
||||
.ft B
|
||||
uid = <task user>;
|
||||
gid = <task group>;
|
||||
fperm = <file permissions>
|
||||
.RE
|
||||
}
|
||||
admin {
|
||||
.RS
|
||||
uid = <admin name>;
|
||||
gid = <admin group>;
|
||||
dperm = <directory permissions>
|
||||
fperm = <file permissions>
|
||||
.RE
|
||||
}
|
||||
.RE
|
||||
}
|
||||
.RE
|
||||
}
|
||||
.ft R
|
||||
.fi
|
||||
.RE
|
||||
|
||||
Content of the
|
||||
.B perm
|
||||
section has the same form as in
|
||||
.I group
|
||||
section. The permissions defined here specify owner and permissions of
|
||||
groups and files of all groups, which do not have explicitly specified
|
||||
their permissions in their
|
||||
.I group
|
||||
section.
|
||||
|
||||
.I template
|
||||
section has the same structure as
|
||||
.B group
|
||||
section. Template name uses the same templates string as
|
||||
.B cgrules.conf
|
||||
destination tag (see (\fBcgrules.conf\fR (5)).
|
||||
Template definition is used as a control group definition for rules in
|
||||
\fBcgrules.conf\fR (5) with the same destination name.
|
||||
Templates does not use
|
||||
.B default
|
||||
section settings.
|
||||
|
||||
.\"********************************************"
|
||||
.SH EXAMPLES
|
||||
.LP
|
||||
.SS Example 1
|
||||
.LP
|
||||
The configuration file:
|
||||
.LP
|
||||
.RS
|
||||
.nf
|
||||
mount {
|
||||
.RS
|
||||
cpu = /mnt/cgroups/cpu;
|
||||
cpuacct = /mnt/cgroups/cpu;
|
||||
.RE
|
||||
}
|
||||
.fi
|
||||
.RE
|
||||
|
||||
creates the hierarchy controlled by two subsystems with no groups
|
||||
inside. It corresponds to the following operations:
|
||||
.LP
|
||||
.RS
|
||||
.nf
|
||||
mkdir /mnt/cgroups/cpu
|
||||
mount -t cgroup -o cpu,cpuacct cpu /mnt/cgroups/cpu
|
||||
.fi
|
||||
.RE
|
||||
|
||||
.SS Example 2
|
||||
.LP
|
||||
The configuration file:
|
||||
.LP
|
||||
.RS
|
||||
.nf
|
||||
mount {
|
||||
.RS
|
||||
cpu = /mnt/cgroups/cpu;
|
||||
"name=scheduler" = /mnt/cgroups/cpu;
|
||||
"name=noctrl" = /mnt/cgroups/noctrl;
|
||||
.RE
|
||||
}
|
||||
|
||||
group daemons {
|
||||
.RS
|
||||
cpu {
|
||||
.RS
|
||||
cpu.shares = "1000";
|
||||
.RE
|
||||
}
|
||||
.RE
|
||||
}
|
||||
group test {
|
||||
.RS
|
||||
"name=noctrl" {
|
||||
}
|
||||
.RE
|
||||
}
|
||||
.RE
|
||||
.fi
|
||||
creates two hierarchies. One hierarchy named \fBscheduler\fR controlled by cpu
|
||||
subsystem, with group \fBdaemons\fR inside. Second hierarchy is named
|
||||
\fBnoctrl\fR without any controller, with group \fBtest\fR. It corresponds to
|
||||
following operations:
|
||||
.LP
|
||||
.RS
|
||||
.nf
|
||||
mkdir /mnt/cgroups/cpu
|
||||
mount -t cgroup -o cpu,name=scheduler cpu /mnt/cgroups/cpu
|
||||
mount -t cgroup -o none,name=noctrl none /mnt/cgroups/noctrl
|
||||
|
||||
mkdir /mnt/cgroups/cpu/daemons
|
||||
echo 1000 > /mnt/cgroups/cpu/daemons/www/cpu.shares
|
||||
|
||||
mkdir /mnt/cgroups/noctrl/tests
|
||||
.fi
|
||||
.RE
|
||||
|
||||
The
|
||||
.I daemons
|
||||
group is created automatically when its first subgroup is
|
||||
created. All its parameters have the default value and only root can
|
||||
access group's files.
|
||||
.LP
|
||||
Since both
|
||||
.I cpuacct
|
||||
and
|
||||
.I cpu
|
||||
subsystems are mounted to the same directory, all
|
||||
groups are implicitly controlled also by
|
||||
.I cpuacct
|
||||
subsystem, even if there is no
|
||||
.I cpuacct
|
||||
section in any of the groups.
|
||||
.RE
|
||||
|
||||
.SS Example 3
|
||||
.LP
|
||||
The configuration file:
|
||||
.LP
|
||||
.RS
|
||||
.nf
|
||||
mount {
|
||||
.RS
|
||||
cpu = /mnt/cgroups/cpu;
|
||||
cpuacct = /mnt/cgroups/cpu;
|
||||
.RE
|
||||
}
|
||||
|
||||
group daemons/www {
|
||||
.RS
|
||||
perm {
|
||||
.RS
|
||||
task {
|
||||
.RS
|
||||
uid = root;
|
||||
gid = webmaster;
|
||||
fperm = 770;
|
||||
.RE
|
||||
}
|
||||
admin {
|
||||
.RS
|
||||
uid = root;
|
||||
gid = root;
|
||||
dperm = 775;
|
||||
fperm = 744;
|
||||
.RE
|
||||
}
|
||||
.RE
|
||||
}
|
||||
cpu {
|
||||
.RS
|
||||
cpu.shares = "1000";
|
||||
.RE
|
||||
}
|
||||
.RE
|
||||
}
|
||||
|
||||
group daemons/ftp {
|
||||
.RS
|
||||
perm {
|
||||
.RS
|
||||
task {
|
||||
.RS
|
||||
uid = root;
|
||||
gid = ftpmaster;
|
||||
fperm = 774;
|
||||
.RE
|
||||
}
|
||||
admin {
|
||||
.RS
|
||||
uid = root;
|
||||
gid = root;
|
||||
dperm = 755;
|
||||
fperm = 700;
|
||||
.RE
|
||||
}
|
||||
.RE
|
||||
}
|
||||
cpu {
|
||||
.RS
|
||||
cpu.shares = "500";
|
||||
.RE
|
||||
}
|
||||
.RE
|
||||
}
|
||||
.RE
|
||||
.fi
|
||||
creates the hierarchy controlled by two subsystems with one group and
|
||||
two subgroups inside, setting one parameter.
|
||||
It corresponds to the following operations (except for file permissions
|
||||
which are little bit trickier to emulate via chmod):
|
||||
|
||||
.LP
|
||||
.RS
|
||||
.nf
|
||||
mkdir /mnt/cgroups/cpu
|
||||
mount -t cgroup -o cpu,cpuacct cpu /mnt/cgroups/cpu
|
||||
|
||||
mkdir /mnt/cgroups/cpu/daemons
|
||||
|
||||
mkdir /mnt/cgroups/cpu/daemons/www
|
||||
chown root:root /mnt/cgroups/cpu/daemons/www/*
|
||||
chown root:webmaster /mnt/cgroups/cpu/daemons/www/tasks
|
||||
echo 1000 > /mnt/cgroups/cpu/daemons/www/cpu.shares
|
||||
|
||||
# + chmod the files so the result looks like:
|
||||
# ls -la /mnt/cgroups/cpu/daemons/www/
|
||||
# admin.dperm = 755:
|
||||
# drwxr-xr-x. 2 root webmaster 0 Jun 16 11:51 .
|
||||
#
|
||||
# admin.fperm = 744:
|
||||
# --w-------. 1 root webmaster 0 Jun 16 11:51 cgroup.event_control
|
||||
# -r--r--r--. 1 root webmaster 0 Jun 16 11:51 cgroup.procs
|
||||
# -r--r--r--. 1 root webmaster 0 Jun 16 11:51 cpuacct.stat
|
||||
# -rw-r--r--. 1 root webmaster 0 Jun 16 11:51 cpuacct.usage
|
||||
# -r--r--r--. 1 root webmaster 0 Jun 16 11:51 cpuacct.usage_percpu
|
||||
# -rw-r--r--. 1 root webmaster 0 Jun 16 11:51 cpu.rt_period_us
|
||||
# -rw-r--r--. 1 root webmaster 0 Jun 16 11:51 cpu.rt_runtime_us
|
||||
# -rw-r--r--. 1 root webmaster 0 Jun 16 11:51 cpu.shares
|
||||
# -rw-r--r--. 1 root webmaster 0 Jun 16 11:51 notify_on_release
|
||||
#
|
||||
# tasks.fperm = 770
|
||||
# -rw-rw----. 1 root webmaster 0 Jun 16 11:51 tasks
|
||||
|
||||
|
||||
mkdir /mnt/cgroups/cpu/daemons/ftp
|
||||
chown root:root /mnt/cgroups/cpu/daemons/ftp/*
|
||||
chown root:ftpmaster /mnt/cgroups/cpu/daemons/ftp/tasks
|
||||
echo 500 > /mnt/cgroups/cpu/daemons/ftp/cpu.shares
|
||||
|
||||
# + chmod the files so the result looks like:
|
||||
# ls -la /mnt/cgroups/cpu/daemons/ftp/
|
||||
# admin.dperm = 755:
|
||||
# drwxr-xr-x. 2 root ftpmaster 0 Jun 16 11:51 .
|
||||
#
|
||||
# admin.fperm = 700:
|
||||
# --w-------. 1 root ftpmaster 0 Jun 16 11:51 cgroup.event_control
|
||||
# -r--------. 1 root ftpmaster 0 Jun 16 11:51 cgroup.procs
|
||||
# -r--------. 1 root ftpmaster 0 Jun 16 11:51 cpuacct.stat
|
||||
# -rw-------. 1 root ftpmaster 0 Jun 16 11:51 cpuacct.usage
|
||||
# -r--------. 1 root ftpmaster 0 Jun 16 11:51 cpuacct.usage_percpu
|
||||
# -rw-------. 1 root ftpmaster 0 Jun 16 11:51 cpu.rt_period_us
|
||||
# -rw-------. 1 root ftpmaster 0 Jun 16 11:51 cpu.rt_runtime_us
|
||||
# -rw-------. 1 root ftpmaster 0 Jun 16 11:51 cpu.shares
|
||||
# -rw-------. 1 root ftpmaster 0 Jun 16 11:51 notify_on_release
|
||||
#
|
||||
# tasks.fperm = 774:
|
||||
# -rw-rw-r--. 1 root ftpmaster 0 Jun 16 11:51 tasks
|
||||
|
||||
.fi
|
||||
.RE
|
||||
|
||||
The
|
||||
.I daemons
|
||||
group is created automatically when its first subgroup is
|
||||
created. All its parameters have the default value and only root can
|
||||
access the group's files.
|
||||
.LP
|
||||
Since both
|
||||
.I cpuacct
|
||||
and
|
||||
.I cpu
|
||||
subsystems are mounted to the same directory, all
|
||||
groups are implicitly also controlled by the
|
||||
.I cpuacct
|
||||
subsystem, even if there is no
|
||||
.I cpuacct
|
||||
section in any of the groups.
|
||||
.RE
|
||||
|
||||
.SS Example 4
|
||||
.LP
|
||||
The configuration file:
|
||||
|
||||
.LP
|
||||
.RS
|
||||
.nf
|
||||
mount {
|
||||
.RS
|
||||
cpu = /mnt/cgroups/cpu;
|
||||
cpuacct = /mnt/cgroups/cpuacct;
|
||||
.RE
|
||||
}
|
||||
|
||||
group daemons {
|
||||
.RS
|
||||
cpuacct{
|
||||
}
|
||||
cpu {
|
||||
}
|
||||
.RE
|
||||
}
|
||||
.fi
|
||||
.RE
|
||||
creates two hierarchies and one common group in both of them.
|
||||
It corresponds to the following operations:
|
||||
.LP
|
||||
.RS
|
||||
.nf
|
||||
mkdir /mnt/cgroups/cpu
|
||||
mkdir /mnt/cgroups/cpuacct
|
||||
mount -t cgroup -o cpu cpu /mnt/cgroups/cpu
|
||||
mount -t cgroup -o cpuacct cpuacct /mnt/cgroups/cpuacct
|
||||
|
||||
mkdir /mnt/cgroups/cpu/daemons
|
||||
mkdir /mnt/cgroups/cpuacct/daemons
|
||||
.fi
|
||||
.RE
|
||||
|
||||
In fact there are two groups created. One in the
|
||||
.I cpuacct
|
||||
hierarchy, the second in the
|
||||
.I cpu
|
||||
hierarchy. These two groups have nothing in common and can
|
||||
contain different subgroups and different tasks.
|
||||
|
||||
.SS Example 5
|
||||
.LP
|
||||
|
||||
The configuration file:
|
||||
|
||||
.LP
|
||||
.RS
|
||||
.nf
|
||||
mount {
|
||||
.RS
|
||||
cpu = /mnt/cgroups/cpu;
|
||||
cpuacct = /mnt/cgroups/cpuacct;
|
||||
.RE
|
||||
}
|
||||
|
||||
group daemons {
|
||||
.RS
|
||||
cpuacct{
|
||||
}
|
||||
.RE
|
||||
}
|
||||
|
||||
group daemons/www {
|
||||
.RS
|
||||
cpu {
|
||||
.RS
|
||||
cpu.shares = "1000";
|
||||
.RE
|
||||
}
|
||||
.RE
|
||||
}
|
||||
|
||||
group daemons/ftp {
|
||||
.RS
|
||||
cpu {
|
||||
.RS
|
||||
cpu.shares = "500";
|
||||
.RE
|
||||
}
|
||||
.RE
|
||||
}
|
||||
.fi
|
||||
.RE
|
||||
creates two hierarchies with few groups inside. One of the groups
|
||||
is created in both hierarchies.
|
||||
|
||||
It corresponds to the following operations:
|
||||
.LP
|
||||
.RS
|
||||
.nf
|
||||
mkdir /mnt/cgroups/cpu
|
||||
mkdir /mnt/cgroups/cpuacct
|
||||
mount -t cgroup -o cpu cpu /mnt/cgroups/cpu
|
||||
mount -t cgroup -o cpuacct cpuacct /mnt/cgroups/cpuacct
|
||||
|
||||
mkdir /mnt/cgroups/cpuacct/daemons
|
||||
mkdir /mnt/cgroups/cpu/daemons
|
||||
mkdir /mnt/cgroups/cpu/daemons/www
|
||||
echo 1000 > /mnt/cgroups/cpu/daemons/www/cpu.shares
|
||||
mkdir /mnt/cgroups/cpu/daemons/ftp
|
||||
echo 500 > /mnt/cgroups/cpu/daemons/ftp/cpu.shares
|
||||
.fi
|
||||
.RE
|
||||
Group
|
||||
.I daemons
|
||||
is created in both hierarchies. In the
|
||||
.I cpuacct
|
||||
hierarchy the group is explicitly mentioned in the configuration
|
||||
file. In the
|
||||
.I cpu
|
||||
hierarchy the group is created implicitly when
|
||||
.I www
|
||||
is created there. These two groups have nothing in common, for example
|
||||
they do not share processes and subgroups. Groups
|
||||
.I www
|
||||
and
|
||||
.I ftp
|
||||
are created only in the
|
||||
.I cpu
|
||||
hierarchy and are not controlled by the
|
||||
.I cpuacct
|
||||
subsystem.
|
||||
|
||||
.SS Example 6
|
||||
.LP
|
||||
The configuration file:
|
||||
.LP
|
||||
.RS
|
||||
.nf
|
||||
mount {
|
||||
.RS
|
||||
cpu = /mnt/cgroups/cpu;
|
||||
cpuacct = /mnt/cgroups/cpu;
|
||||
.RE
|
||||
}
|
||||
|
||||
group . {
|
||||
.RS
|
||||
perm {
|
||||
.RS
|
||||
task {
|
||||
.RS
|
||||
uid = root;
|
||||
gid = operator;
|
||||
.RE
|
||||
}
|
||||
admin {
|
||||
.RS
|
||||
uid = root;
|
||||
gid = operator;
|
||||
.RE
|
||||
}
|
||||
.RE
|
||||
}
|
||||
cpu {
|
||||
}
|
||||
.RE
|
||||
}
|
||||
|
||||
group daemons {
|
||||
.RS
|
||||
perm {
|
||||
.RS
|
||||
task {
|
||||
.RS
|
||||
uid = root;
|
||||
gid = daemonmaster;
|
||||
.RE
|
||||
}
|
||||
admin {
|
||||
.RS
|
||||
uid = root;
|
||||
gid = operator;
|
||||
.RE
|
||||
}
|
||||
.RE
|
||||
}
|
||||
cpu {
|
||||
}
|
||||
.RE
|
||||
}
|
||||
.RE
|
||||
.fi
|
||||
creates the hierarchy controlled by two subsystems with one group having some
|
||||
special permissions.
|
||||
It corresponds to the following operations:
|
||||
.LP
|
||||
.RS
|
||||
.nf
|
||||
mkdir /mnt/cgroups/cpu
|
||||
mount -t cgroup -o cpu,cpuacct cpu /mnt/cgroups/cpu
|
||||
|
||||
chown root:operator /mnt/cgroups/cpu/*
|
||||
chown root:operator /mnt/cgroups/cpu/tasks
|
||||
|
||||
mkdir /mnt/cgroups/cpu/daemons
|
||||
chown root:operator /mnt/cgroups/cpu/daemons/*
|
||||
chown root:daemonmaster /mnt/cgroups/cpu/daemons/tasks
|
||||
.fi
|
||||
.RE
|
||||
|
||||
Users which are members of the
|
||||
.I operator
|
||||
group are allowed to administer the control groups, i.e. create new control
|
||||
groups and move processes between these groups without having root
|
||||
privileges.
|
||||
|
||||
Members of the
|
||||
.I daemonmaster
|
||||
group can move processes to the
|
||||
.I daemons
|
||||
control group, but they can not move the process out of the group. Only the
|
||||
.I operator
|
||||
or root can do that.
|
||||
|
||||
.SS Example 7
|
||||
.LP
|
||||
The configuration file:
|
||||
|
||||
.LP
|
||||
.RS
|
||||
.nf
|
||||
mount {
|
||||
.RS
|
||||
cpu = /mnt/cgroups/cpu;
|
||||
cpuacct = /mnt/cgroups/cpuacct;
|
||||
.RE
|
||||
}
|
||||
|
||||
group students {
|
||||
.RS
|
||||
cpuacct{
|
||||
}
|
||||
cpu {
|
||||
}
|
||||
.RE
|
||||
}
|
||||
|
||||
template students/%u {
|
||||
.RS
|
||||
cpuacct{
|
||||
}
|
||||
cpu {
|
||||
}
|
||||
.RE
|
||||
}
|
||||
|
||||
mkdir /mnt/cgroups/cpu/daemons
|
||||
mkdir /mnt/cgroups/cpuacct/daemons
|
||||
.fi
|
||||
.RE
|
||||
|
||||
The situation is the similar as in Example 4. The only difference is template,
|
||||
which is used if some rule uses "/students/%u" as a destination.
|
||||
|
||||
|
||||
|
||||
.SH RECOMMENDATIONS
|
||||
.SS Keep hierarchies separated
|
||||
Having multiple hierarchies is perfectly valid and can be useful
|
||||
in various scenarios. To keeps things clean, do not
|
||||
create one group in multiple hierarchies. Examples 4 and 5 show
|
||||
how unreadable and confusing it can be, especially when reading
|
||||
somebody elses configuration file.
|
||||
|
||||
.SS Explicit is better than implicit
|
||||
.B libcgroup
|
||||
can implicitly create groups which are needed for the creation of
|
||||
configured subgroups. This may be useful and save some typing in
|
||||
simple scenarios. When it comes to multiple hierarchies, it's
|
||||
better to explicitly specify all groups and all controllers
|
||||
related to them.
|
||||
|
||||
.SH FILES
|
||||
.LP
|
||||
.PD .1v
|
||||
.TP 20
|
||||
.B /etc/cgconfig.conf
|
||||
.TP
|
||||
default libcgroup configuration file
|
||||
.PD
|
||||
|
||||
.SH SEE ALSO
|
||||
cgconfigparser (8)
|
||||
|
||||
.SH BUGS
|
||||
Parameter values must be single strings without spaces.
|
||||
Parsing of quoted strings is not implemented.
|
||||
|
||||
.SH
|
||||
|
78
libcgroup-0.41/doc/man/cgconfigparser.8
Normal file
78
libcgroup-0.41/doc/man/cgconfigparser.8
Normal file
@ -0,0 +1,78 @@
|
||||
.\" Copyright (C) 2009 Red Hat, Inc. All Rights Reserved.
|
||||
.\" Written by Ivana Varekova <varekova@redhat.com>.
|
||||
|
||||
.TH CGCONFIGPARSER 8 2009-03-16 "Linux" "libcgroup Manual"
|
||||
.SH NAME
|
||||
|
||||
cgconfigparser \- setup control group file system
|
||||
|
||||
.SH SYNOPSIS
|
||||
\fBcgconfigparser\fR [\fB-h\fR] [\fB-l\fR \fI<filename>\fR] [\fB-L\fR \fI<directory>\fR] [...]
|
||||
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.B -h, --help
|
||||
Displays help.
|
||||
.TP
|
||||
.B -l, --load=FILE
|
||||
Parses the control groups configuration file
|
||||
Sets up the control group file system
|
||||
defined by the configuration file and mounts
|
||||
mount points defined by the configuration file.
|
||||
The format of the file is described in
|
||||
\fBcgconfig.conf\fR. This option can be used multiple times and can be mixed
|
||||
with \fB-L\fR option.
|
||||
|
||||
.TP
|
||||
.B -L, --load-directory=DIR
|
||||
Finds all files in given directory and parses them in alphabetical order
|
||||
like they were specified by \fB-l\fR option. This option can be used
|
||||
multiple times and can be mixed with \fB-l\fR option.
|
||||
|
||||
.TP
|
||||
.B -a <agid>:<auid>
|
||||
defines the default owner of the
|
||||
rest of the defined control group’s files. These users are
|
||||
allowed to set subsystem parameters and create subgroups.
|
||||
The default value is the same as has the parent cgroup.
|
||||
|
||||
.TP
|
||||
.B -d, --dperm=mode
|
||||
sets the default permissions of a control groups directory.
|
||||
The permissions needs to be specified as octal numbers e.g.
|
||||
\fB-d 775\fR.
|
||||
|
||||
.TP
|
||||
.B -f, --fperm=mode
|
||||
sets the default permissions of the control group files.
|
||||
The permissions needs to be specified as octal numbers e.g.
|
||||
\fB-f 775\fR.
|
||||
The value is not used as given because the current owner's
|
||||
permissions are used as an umask (so 777 will set group and
|
||||
others permissions to the owners permissions).
|
||||
|
||||
.TP
|
||||
.B -s, --tperm=mode
|
||||
sets the default permissions of the control group tasks files.
|
||||
The permissions needs to be specified as octal numbers e.g.
|
||||
\fB-f 775\fR.
|
||||
The value is not used as given because the current owner's
|
||||
permissions are used as an umask (so 777 will set group and
|
||||
others permissions to the owners permissions).
|
||||
|
||||
.TP
|
||||
.B -t <tuid>:<tgid>
|
||||
defines the default owner of tasks file of the defined control
|
||||
group. I.e. this user and members
|
||||
of this group have write access to the file.
|
||||
|
||||
.LP
|
||||
|
||||
.SH ENVIRONMENT VARIABLES
|
||||
.TP
|
||||
.B CGROUP_LOGLEVEL
|
||||
controls verbosity of the tool. Allowed values are \fBDEBUG\fR,
|
||||
\fBINFO\fR, \fBWARNING\fR or \fBERROR\fR.
|
||||
|
||||
.SH SEE ALSO
|
||||
cgconfig.conf (5)
|
77
libcgroup-0.41/doc/man/cgcreate.1
Normal file
77
libcgroup-0.41/doc/man/cgcreate.1
Normal file
@ -0,0 +1,77 @@
|
||||
.\" Written by Ivana Hutarova Varekova <varekova@redhat.com>
|
||||
|
||||
.TH CGCREATE 1 2009-03-15 "Linux" "libcgroup Manual"
|
||||
.SH NAME
|
||||
cgcreate \- create new cgroup(s)
|
||||
|
||||
.SH SYNOPSIS
|
||||
\fBcgcreate\fR [\fB-h\fR] [\fB-t\fR <\fItuid>:<tgid\fR>]
|
||||
[\fB-a\fR <\fIagid>:<auid\fR>] [\fB-f\fR mode] [\fB-d\fR mode]
|
||||
[\fB-s\fR mode] \fB-g\fR <\fIcontrollers>:<path\fR> [\fB-g\fR ...]
|
||||
|
||||
.SH DESCRIPTION
|
||||
The command creates new cgroup(s) defined by the options
|
||||
\fB-g\fR.
|
||||
|
||||
.TP
|
||||
.B -a <agid>:<auid>
|
||||
defines the name of the user and the group which own the
|
||||
rest of the defined control group’s files. These users are
|
||||
allowed to set subsystem parameters and create subgroups.
|
||||
The default value is the same as has the parent cgroup.
|
||||
|
||||
.TP
|
||||
.B -d, --dperm=mode
|
||||
sets the permissions of a control groups directory.
|
||||
The permissions needs to be specified as octal numbers e.g.
|
||||
\fB-d 775\fR.
|
||||
|
||||
.TP
|
||||
.B -f, --fperm=mode
|
||||
sets the permissions of the control groups parameters.
|
||||
The permissions needs to be specified as octal numbers e.g.
|
||||
\fB-f 775\fR.
|
||||
The value is not used as given because the current owner's
|
||||
permissions are used as an umask (so 777 will set group and
|
||||
others permissions to the owners permissions).
|
||||
|
||||
.TP
|
||||
.B -g <controllers>:<path>
|
||||
defines control groups to be added.
|
||||
\fBcontrollers\fR is a list of controllers and
|
||||
\fBpath\fR is the relative path to control groups
|
||||
in the given controllers list. This option can be specified
|
||||
multiple times.
|
||||
|
||||
.TP
|
||||
.B -h, --help
|
||||
display this help and exit
|
||||
|
||||
.TP
|
||||
.B -s, --tperm=mode
|
||||
sets the permissions of the control group tasks file.
|
||||
The permissions needs to be specified as octal numbers e.g.
|
||||
\fB-s 775\fR.
|
||||
The value is not used as given because the current owner's
|
||||
permissions are used as an umask (so 777 will set group and
|
||||
others permissions to the owners permissions).
|
||||
|
||||
.TP
|
||||
.B -t <tuid>:<tgid>
|
||||
defines the name of the user and the group, which owns tasks
|
||||
file of the defined control group. I.e. this user and members
|
||||
of this group have write access to the file.
|
||||
The default value is the same as has the parent cgroup.
|
||||
|
||||
.SH ENVIRONMENT VARIABLES
|
||||
.TP
|
||||
.B CGROUP_LOGLEVEL
|
||||
controls verbosity of the tool. Allowed values are \fBDEBUG\fR,
|
||||
\fBINFO\fR, \fBWARNING\fR or \fBERROR\fR.
|
||||
|
||||
.SH FILES
|
||||
|
||||
.SH SEE ALSO
|
||||
cgrules.conf (5)
|
||||
cgexec (1)
|
||||
cgclassify (1)
|
39
libcgroup-0.41/doc/man/cgdelete.1
Normal file
39
libcgroup-0.41/doc/man/cgdelete.1
Normal file
@ -0,0 +1,39 @@
|
||||
.\" Copyright (C) 2009 Red Hat, Inc. All Rights Reserved.
|
||||
.\" Written by Jan Safranek <jsafrane@redhat.com>
|
||||
|
||||
.TH CGDELETE 1 2009-10-26 "Linux" "libcgroup Manual"
|
||||
.SH NAME
|
||||
|
||||
cgdelete \- remove control group(s)
|
||||
|
||||
.SH SYNOPSIS
|
||||
\fBcgdelete\fR [\fB-h\fR] [\fB-r\fR] [[\fB-g\fR]
|
||||
<\fIcontrollers\fR>:\fI<path\fR>] ...
|
||||
|
||||
.SH DESCRIPTION
|
||||
The \fBcgdelete\fR
|
||||
program removes all specified control groups.
|
||||
|
||||
.TP
|
||||
.B [-g] <controllers>:<path>
|
||||
Defines the control group to delete. Multiple control groups nay be
|
||||
specified.
|
||||
.B -g
|
||||
is optional.
|
||||
|
||||
.TP
|
||||
.B -h, --help
|
||||
Display this help and exit.
|
||||
|
||||
.TP
|
||||
.B -r, --recursive
|
||||
Recursively remove all subgroups.
|
||||
|
||||
.SH ENVIRONMENT VARIABLES
|
||||
.TP
|
||||
.B CGROUP_LOGLEVEL
|
||||
controls verbosity of the tool. Allowed values are \fBDEBUG\fR,
|
||||
\fBINFO\fR, \fBWARNING\fR or \fBERROR\fR.
|
||||
|
||||
.SH SEE ALSO
|
||||
cgcreate (1), lscgroup (1), cgclear (1)
|
96
libcgroup-0.41/doc/man/cgexec.1
Normal file
96
libcgroup-0.41/doc/man/cgexec.1
Normal file
@ -0,0 +1,96 @@
|
||||
.\" Copyright (C) 2009 Red Hat, Inc. All Rights Reserved.
|
||||
.\" Written by Ivana Varekova <varekova@redhat.com>
|
||||
|
||||
.TH CGEXEC 1 2009-03-15 "Linux" "libcgroup Manual"
|
||||
.SH NAME
|
||||
|
||||
cgexec \- run the task in given control groups
|
||||
|
||||
.SH SYNOPSIS
|
||||
\fBcgexec\fR [\fB-h\fR] [\fB-g\fR <\fIcontrollers>:<path\fR>] [--sticky] \fBcommand\fR [\fIarguments\fR]
|
||||
|
||||
.SH DESCRIPTION
|
||||
The \fBcgexec\fR
|
||||
program executes the task \fBcommand\fR
|
||||
with arguments \fBarguments\fR in the given control groups.
|
||||
|
||||
.TP
|
||||
.B -g <controllers>:<path>
|
||||
defines the control groups in which the task will be run.
|
||||
\fBcontrollers\fR is a list of controllers and
|
||||
\fBpath\fR is the relative path to control groups
|
||||
in the given controllers list.
|
||||
|
||||
This flag can be used multiple times to
|
||||
define multiple pairs of lists of controllers
|
||||
and relative paths.
|
||||
Instead of the list of all mounted controllers,
|
||||
the wildcard \fBb"*b"\fR can be used.
|
||||
|
||||
If this option is not used,
|
||||
\fBcgexec\fR will automatically place the task in the right
|
||||
cgroup based on \fB/etc/cgrules.conf\fR.
|
||||
|
||||
If \fB/etc/cgrules.conf\fR configuration file is used, there can be used
|
||||
template names. Then the control group name contains
|
||||
a template in destination tag (see \fBcgrules.conf\fR (5))
|
||||
and if the cgroup does not exist in execution time,
|
||||
it is created, based on \fB/etc/cgconfig.conf\fR specification.
|
||||
If the specifications are not present the group is created with the default
|
||||
kernel values.
|
||||
|
||||
.TP
|
||||
.B -h, --help
|
||||
Display this help and exit.
|
||||
|
||||
.TP
|
||||
.B --sticky
|
||||
If running the task \fBcommand\fR with this option, the daemon of
|
||||
service cgred (cgrulesengd process) does not change both the task
|
||||
of the \fBcommand\fR and the child tasks. Without this option,
|
||||
the daemon does not change the task of the \fBcommand\fR but it
|
||||
changes the child tasks to the right cgroup based on
|
||||
\fB/etc/cgrules.conf\fR automatically.
|
||||
|
||||
.LP
|
||||
|
||||
.SH EXAMPLES
|
||||
|
||||
.nf
|
||||
.ft B
|
||||
cgexec -g *:test1 ls
|
||||
.ft R
|
||||
.fi
|
||||
runs command \fBls\fR in control group test1
|
||||
in all mounted controllers.
|
||||
|
||||
.nf
|
||||
.ft B
|
||||
cgexec -g cpu,memory:test1 ls -l
|
||||
.ft R
|
||||
.fi
|
||||
runs command \fBls -l\fR in control group test1
|
||||
in controllers cpu and memory.
|
||||
|
||||
.nf
|
||||
.ft B
|
||||
cgexec -g cpu,memory:test1 -g swap:test2 ls -l
|
||||
.ft R
|
||||
.fi
|
||||
runs command \fBls -l\fR in control group test1
|
||||
in controllers cpu and memory and control group
|
||||
test2 in controller swap.
|
||||
|
||||
.SH ENVIRONMENT VARIABLES
|
||||
.TP
|
||||
.B CGROUP_LOGLEVEL
|
||||
controls verbosity of the tool. Allowed values are \fBDEBUG\fR,
|
||||
\fBINFO\fR, \fBWARNING\fR or \fBERROR\fR.
|
||||
|
||||
.SH FILES
|
||||
.TP
|
||||
.B /etc/cgrules.conf
|
||||
default libcgroup configuration file
|
||||
|
||||
.SH SEE ALSO
|
||||
cgrules.conf (5)
|
96
libcgroup-0.41/doc/man/cgget.1
Normal file
96
libcgroup-0.41/doc/man/cgget.1
Normal file
@ -0,0 +1,96 @@
|
||||
.\" Copyright (C) 2010 Red Hat, Inc. All Rights Reserved.
|
||||
.\" Written by Jan Safranek <jsafrane@redhat.com>
|
||||
|
||||
.TH CGGET 1 2010-01-18 "Linux" "libcgroup Manual"
|
||||
.SH NAME
|
||||
|
||||
cgget \- print parameter(s) of given group(s)
|
||||
|
||||
.SH SYNOPSIS
|
||||
\fBcgget\fR [\fB-n\fR] [\fB-v\fR] [\fB-r\fR <\fIname\fR>]
|
||||
[\fB-g\fR <\fIcontroller\fR>] [\fB-a\fR] <\fBpath\fR> ...
|
||||
.br
|
||||
\fBcgget\fR [\fB-n\fR] [\fB-v\fR] [\fB-r\fR <\fIname\fR>]
|
||||
\fB-g\fR <\fIcontroller\fR>:<\fBpath\fR> ...
|
||||
|
||||
.SH DESCRIPTION
|
||||
Prints the parameter(s) of input cgroup(s).
|
||||
If neither controller nor variable are specified,
|
||||
the values of all possible variables are displayed.
|
||||
|
||||
.TP
|
||||
.B <path>
|
||||
is the name of the cgroup which should be read.
|
||||
This parameter can be used multiple times.
|
||||
|
||||
.TP
|
||||
.B -a, --all
|
||||
print the variables for all controllers which consist in the given cgroup
|
||||
|
||||
.TP
|
||||
.B -g <controller>
|
||||
defines controllers whose values should be displayed.
|
||||
This option can be used multiple times.
|
||||
|
||||
.TP
|
||||
.B -g <controller>:<path>
|
||||
defines control groups whose values should be displayed.
|
||||
This option can be used multiple times.
|
||||
|
||||
.TP
|
||||
.B -h, --help
|
||||
display help and exit
|
||||
|
||||
.TP
|
||||
.B -n
|
||||
do not print headers, i.e. names of groups.
|
||||
|
||||
.TP
|
||||
.B -r, --variable <name>
|
||||
defines parameter to display.
|
||||
This option can be used multiple times.
|
||||
|
||||
|
||||
.TP
|
||||
.B -v, --values-only
|
||||
print only values, not parameter names.
|
||||
|
||||
.SH EXAMPLES
|
||||
.nf
|
||||
$ cgget -r cpuset.cpus -r cpuset.mems first second
|
||||
first:
|
||||
cpuset.cpus=0-1
|
||||
cpuset.mems=0
|
||||
|
||||
second:
|
||||
cpuset.cpus=0
|
||||
cpuset.mems=0
|
||||
|
||||
$ cgget -n -r cpuset.cpus -r cpuset.mems first second
|
||||
cpuset.cpus=0-1
|
||||
cpuset.mems=0
|
||||
cpuset.cpus=0
|
||||
cpuset.mems=0
|
||||
|
||||
$ cgget -nv -r cpuset.cpus -r cpuset.mems first second
|
||||
0-1
|
||||
0
|
||||
0
|
||||
0
|
||||
|
||||
$ cgget -n -g cpu /
|
||||
cpu.rt_period_us=1000000
|
||||
cpu.rt_runtime_us=950000
|
||||
cpu.shares=1024
|
||||
|
||||
.fi
|
||||
|
||||
.SH ENVIRONMENT VARIABLES
|
||||
.TP
|
||||
.B CGROUP_LOGLEVEL
|
||||
controls verbosity of the tool. Allowed values are \fBDEBUG\fR,
|
||||
\fBINFO\fR, \fBWARNING\fR or \fBERROR\fR.
|
||||
|
||||
.SH SEE ALSO
|
||||
cgrules.conf (1), cgcreate (1), cgget (1)
|
||||
|
49
libcgroup-0.41/doc/man/cgred.conf.5
Normal file
49
libcgroup-0.41/doc/man/cgred.conf.5
Normal file
@ -0,0 +1,49 @@
|
||||
.\" Copyright (C) 2006 Red Hat, Inc. All Rights Reserved.
|
||||
.\" Written by Ivana Varekova <varekova@redhat.com>.
|
||||
|
||||
.TH CGRED.CONF 5 2009-03-16 "Linux" "libcgroup Manual"
|
||||
.SH NAME
|
||||
cgred.conf \- libcgroup configuration file
|
||||
.SH DESCRIPTION
|
||||
\fBcgred.conf\fR is cgred service configuration file.
|
||||
In this file there could be defined several internal values.
|
||||
Defining anything else in this file will cause the
|
||||
CGroup Rules Daemon program to fail.
|
||||
.TP
|
||||
|
||||
\fBCONFIG_FILE\fR
|
||||
specifies the configuration file for cgred service
|
||||
|
||||
.TP
|
||||
\fBLOG_FILE\fR
|
||||
variable specifies the file to which logs will be written
|
||||
(by default they are not sent to a file but to syslog)
|
||||
|
||||
.TP
|
||||
\fBNODAEMON\fR
|
||||
if it is equal to "--nodamon" then
|
||||
run cgred in non-daemon mode
|
||||
|
||||
.TP
|
||||
\fBLOG\fR
|
||||
define the verbosity of logging. Accepted values are '-v', '-vv', '-q'
|
||||
and '--nolog'.
|
||||
.LP
|
||||
|
||||
|
||||
.SH FILES
|
||||
.LP
|
||||
.PD .1v
|
||||
.TP 20
|
||||
.B /etc/cgred.conf
|
||||
.TP
|
||||
default libcgroup configuration file
|
||||
.PD .
|
||||
|
||||
.SH SEE ALSO
|
||||
cgrules.conf (5),
|
||||
cgconfig.conf (5)
|
||||
|
||||
|
||||
|
||||
|
159
libcgroup-0.41/doc/man/cgrules.conf.5
Normal file
159
libcgroup-0.41/doc/man/cgrules.conf.5
Normal file
@ -0,0 +1,159 @@
|
||||
.\" Copyright (C) 2009 Red Hat, Inc. All Rights Reserved.
|
||||
.\" Written by Ivana Varekova <varekova@redhat.com>
|
||||
|
||||
.TH CGRULES.CONF 5 2009-03-10 "Linux" "libcgroup Manual"
|
||||
.SH NAME
|
||||
cgrules.conf \- libcgroup configuration file
|
||||
.SH DESCRIPTION
|
||||
.B "cgrules.conf"
|
||||
configuration file is used by
|
||||
.B libcgroups
|
||||
to define control groups to which a process belongs.
|
||||
|
||||
|
||||
The file contains a list of rules which assign to a defined group/user a control
|
||||
group in a subsystem (or control groups in subsystems).
|
||||
|
||||
Rules have two formats:
|
||||
|
||||
.in +4n
|
||||
.nf
|
||||
<user> <controllers> <destination>
|
||||
.fi
|
||||
.nf
|
||||
<user>:<process name> <controllers> <destination>
|
||||
.fi
|
||||
.in
|
||||
|
||||
Where:
|
||||
|
||||
.I user
|
||||
can be:
|
||||
.nf
|
||||
- a user name
|
||||
- a group name with @group syntax
|
||||
- the wildcard '*', for any user or group
|
||||
- '%', which is equivalent to "ditto" (useful for
|
||||
multi-line rules where different cgroups need to be
|
||||
specified for various hierarchies for a single user)
|
||||
.fi
|
||||
|
||||
.I process name
|
||||
is optional and it can be:
|
||||
.nf
|
||||
- a process name
|
||||
- a full command path of a process
|
||||
.fi
|
||||
|
||||
.I controllers
|
||||
can be:
|
||||
.nf
|
||||
- comma separated controller names (no spaces) or
|
||||
- * (for all mounted controllers)
|
||||
.fi
|
||||
|
||||
.I destination
|
||||
can be:
|
||||
.nf
|
||||
- path relative to the controller hierarchy (ex. pgrp1/gid1/uid1)
|
||||
- following strings called "\fBtemplates\fR" and will get expanded
|
||||
|
||||
%u username, uid if name resolving fails
|
||||
%U uid
|
||||
%g group name, gid if name resolving fails
|
||||
%G gid
|
||||
%p process name, pid if name not available
|
||||
%P pid
|
||||
|
||||
'\\' can be used to escape '%'
|
||||
.fi
|
||||
First rule which matches the criteria will be executed.
|
||||
|
||||
Any text starting with '#' is considered as a start of comment line and is
|
||||
ignored.
|
||||
|
||||
If the
|
||||
.I destination
|
||||
contains
|
||||
.B template
|
||||
string, the control group can be created on-fly. In time when some process wants
|
||||
to use the template rule which leads to control group (see
|
||||
\fBcgexec\fR (1)) and the control group does not exist, the group is created. The
|
||||
template control group parameters can be specified in
|
||||
.B cgconfig.conf
|
||||
configuration file. See (\fBcgconfig.conf\fR (5)).
|
||||
If the template definition is not found there created group have default
|
||||
kernel setting.
|
||||
|
||||
|
||||
|
||||
.SH EXAMPLES
|
||||
.nf
|
||||
student devices /usergroup/students
|
||||
.fi
|
||||
Student's processes in the 'devices' subsystem belong to the control
|
||||
group /usergroup/students.
|
||||
|
||||
.nf
|
||||
student:cp devices /usergroup/students/cp
|
||||
.fi
|
||||
When student executes 'cp' command, the processes in the 'devices' subsystem
|
||||
belong to the control group /usergroup/students/cp.
|
||||
|
||||
.nf
|
||||
@admin * admingroup/
|
||||
.fi
|
||||
Processes started by anybody from admin group no matter in what subsystem belong
|
||||
to the control group admingroup/.
|
||||
|
||||
.nf
|
||||
peter cpu test1/
|
||||
% memory test2/
|
||||
.fi
|
||||
The first line says Peter's task for cpu controller belongs to test1 control
|
||||
group. The second one says Peter's tasks for memory controller belong to test2/
|
||||
control group.
|
||||
|
||||
.nf
|
||||
* * default/
|
||||
.fi
|
||||
All processes in any subsystem belong to the control group default/. Since
|
||||
the earliest matched rule is applied, it makes sense to have this line
|
||||
at the end of the list. It will put a task which was not mentioned in the
|
||||
previous rules to default/ control group.
|
||||
|
||||
.nf
|
||||
@students cpu,cpuacct students/%u
|
||||
.fi
|
||||
Processes in cpu and cpuacct subsystems started by anybody from students group
|
||||
belong to group students/name. Where "name" is user name of owner of the
|
||||
process.
|
||||
|
||||
|
||||
|
||||
.SH FILES
|
||||
.LP
|
||||
.PD .1v
|
||||
.TP 20
|
||||
.B /etc/cgrules.conf
|
||||
.TP
|
||||
default libcgroup configuration file
|
||||
.PD .
|
||||
|
||||
|
||||
.SH SEE ALSO
|
||||
cgconfig.conf (5), cgclassify (1), cgred.conf (5)
|
||||
|
||||
.SH BUGS
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
74
libcgroup-0.41/doc/man/cgrulesengd.8
Normal file
74
libcgroup-0.41/doc/man/cgrulesengd.8
Normal file
@ -0,0 +1,74 @@
|
||||
.\" Copyright (C) 2009 Red Hat, Inc. All Rights Reserved.
|
||||
.\" Written by Jan Safranek <jsafrane@redhat.com>.
|
||||
.TH CGRULESENGD 8 2009-02-18 "Linux" "libcgroup Manual"
|
||||
.SH NAME
|
||||
cgrulesengd \- control group rules daemon
|
||||
|
||||
.SH SYNOPSIS
|
||||
\fBcgrulesengd\fR [options]
|
||||
|
||||
.SH DESCRIPTION
|
||||
\fBcgrulesengd\fR is a daemon, which distributes processes to control groups. When
|
||||
any process changes its effective UID or GID, \fBcgrulesengd\fR inspects the list
|
||||
of rules loaded from the \fIcgrules.conf\fR file and moves the process to
|
||||
the appropriate control group.
|
||||
|
||||
The list of rules is read during the daemon startup is are cached in the daemon's memory.
|
||||
The daemon reloads the list of rules when it receives SIGUSR2 signal.
|
||||
The daemon reloads the list of templates when it receives SIGUSR1 signal.
|
||||
|
||||
The daemon opens a standard unix socket to receive 'sticky' requests from \fBcgexec\fR.
|
||||
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.B -h|--help
|
||||
Display help.
|
||||
.TP
|
||||
.B -f <path>|--logfile=<path>
|
||||
Write log messages to the given log file. When '-' is used as <path>, log messages
|
||||
are written to the standard output. If '\fB-f\fR' and '\fB-s\fR' are used together,
|
||||
the logs are sent to both destinations.
|
||||
|
||||
.TP
|
||||
.B -s[facility]|--syslog=[facility]
|
||||
Write log messages to syslog. The default facility is DAEMON. If '\fB-f\fR'
|
||||
and '\fB-s\fR' are used together, the logs are sent to both destinations.
|
||||
.TP
|
||||
.B -n|--nodaemon
|
||||
Don't fork the daemon, stay in the foreground.
|
||||
.TP
|
||||
.B -v|--verbose
|
||||
Display more log messages. This option can be used three times to enable more
|
||||
verbose log messages.
|
||||
.TP
|
||||
.B -q|--quiet
|
||||
Display less log messages.
|
||||
.TP
|
||||
.B -Q|--nolog
|
||||
Disable logging.
|
||||
.TP
|
||||
.B -d|--debug
|
||||
Equivalent to '-nvvvf -', i.e. don't fork the daemon, display all log messages and
|
||||
write them to the standard output.
|
||||
.TP
|
||||
.B -u <user>|--socket-user=<user>
|
||||
.B -g <group>|--socket-group=<group>
|
||||
Set the owner of cgrulesengd socket. Assumes that \fBcgexec\fR runs with proper
|
||||
suid permissions so it can write to the socket when \fBcgexec\fR --sticky is used.
|
||||
|
||||
.SH ENVIRONMENT VARIABLES
|
||||
.TP
|
||||
.B CGROUP_LOGLEVEL
|
||||
controls verbosity of the tool. Allowed values are \fBDEBUG\fR,
|
||||
\fBINFO\fR, \fBWARNING\fR or \fBERROR\fR.
|
||||
|
||||
.SH FILES
|
||||
.LP
|
||||
.PD .1v
|
||||
.TP 20
|
||||
.B /etc/cgrules.conf
|
||||
.TP
|
||||
the default libcgroup configuration file
|
||||
|
||||
.SH SEE ALSO
|
||||
cgrules.conf (5)
|
40
libcgroup-0.41/doc/man/cgset.1
Normal file
40
libcgroup-0.41/doc/man/cgset.1
Normal file
@ -0,0 +1,40 @@
|
||||
.\" Copyright (C) 2009 Red Hat, Inc. All Rights Reserved.
|
||||
.\" Written by Ivana Hutarova Varekova <varekova@redhat.com>
|
||||
|
||||
.TH CGSET 1 2009-03-15 "Linux" "libcgroup Manual"
|
||||
.SH NAME
|
||||
|
||||
cgset \- set the parameters of given cgroup(s)
|
||||
|
||||
.SH SYNOPSIS
|
||||
\fBcgset\fR [\fB-r\fR <\fIname=value\fR>] <\fBcgroup_path\fR> ...
|
||||
.br
|
||||
\fBcgset\fR \fB--copy-from\fR <\fIsource_cgroup_path\fR> <\fBcgroup_path\fR> ...
|
||||
|
||||
.SH DESCRIPTION
|
||||
Set the parameters of input cgroups.
|
||||
|
||||
.TP
|
||||
.B <path>
|
||||
is the name of the cgroup which should be changed.
|
||||
This parameter can be used multiple times.
|
||||
|
||||
.TP
|
||||
.B -r <name=value>
|
||||
defines the name of the file to set and
|
||||
the value which should be written to that file.
|
||||
This parameter can be used multiple times.
|
||||
|
||||
.TP
|
||||
.B --copy-from <source_cgroup_path>
|
||||
defines the name of the cgroup whose parameters will be
|
||||
copied to the input cgroup.
|
||||
|
||||
.SH ENVIRONMENT VARIABLES
|
||||
.TP
|
||||
.B CGROUP_LOGLEVEL
|
||||
controls verbosity of the tool. Allowed values are \fBDEBUG\fR,
|
||||
\fBINFO\fR, \fBWARNING\fR or \fBERROR\fR.
|
||||
|
||||
.SH SEE ALSO
|
||||
cgrules.conf (1), cgcreate (1), cgget (1)
|
100
libcgroup-0.41/doc/man/cgsnapshot.1
Normal file
100
libcgroup-0.41/doc/man/cgsnapshot.1
Normal file
@ -0,0 +1,100 @@
|
||||
.\" Copyright (C) 2010 Red Hat, Inc. All Rights Reserved.
|
||||
.\" Written by Ivana Hutarova Varekova <varekova@redhat.com>
|
||||
|
||||
.TH CGSNAPSHOT 1 2010-07-28 "Linux" "libcgroup Manual"
|
||||
.SH NAME
|
||||
|
||||
cgsnapshot \- generate the configuration file for given controllers
|
||||
|
||||
.SH SYNOPSIS
|
||||
\fBcgsnapshot\fR [\fB-h\fR] [\fB-s\fR] [\fB-t\fR] [\fB-b\fR \fIfile\fR]
|
||||
[\fB-w\fR \fIfile\fR] [\fB-f\fR \fIoutput_file\fR] [\fBcontroller\fR] [...]
|
||||
|
||||
.SH DESCRIPTION
|
||||
\fBcgsnapshot\fR
|
||||
generates the cgconfig compatible configuration file
|
||||
for the given controllers.
|
||||
If no controller is set, then
|
||||
cgsnapshot shows all mounted hierarchies.
|
||||
The output is in the same format as the
|
||||
.B cgconfig.conf
|
||||
configuration file.
|
||||
|
||||
.TP
|
||||
.B -b file
|
||||
Display only variables from the blacklist.
|
||||
The default location of the blacklist is
|
||||
.B /etc/cgsnapshot_blacklist.conf.
|
||||
This list contains all variables which should be ignored by the
|
||||
.B cgsnapshot
|
||||
.
|
||||
If the variable is blacklisted, it will not be displayed.
|
||||
If it is not present on the blacklist, the whitelist
|
||||
is checked.
|
||||
|
||||
.TP
|
||||
.B -h, --help
|
||||
display this help and exit
|
||||
|
||||
.TP
|
||||
.B -f, --file
|
||||
Redirect the output to output_file
|
||||
|
||||
|
||||
.TP
|
||||
.B -s, --silent
|
||||
Ignore all warnings
|
||||
|
||||
.TP
|
||||
.B -t, --strict
|
||||
Do not display the variables which are not on the whitelist
|
||||
|
||||
|
||||
.TP
|
||||
.B -w file
|
||||
Set the blacklist configuration file.
|
||||
This list contains all variables which should be displayed by
|
||||
.B cgsnapshot
|
||||
.
|
||||
If the variable is not blacklisted, the whitelist is checked.
|
||||
If the variable is on the whitelist, it is displayed by
|
||||
.B cgsnapshot
|
||||
.
|
||||
If the variable is not on the whitelist,
|
||||
the variable is displayed and a warning message is produced.
|
||||
By default the whitelist is not used.
|
||||
|
||||
The warning message can be omitted using the
|
||||
.B -s, --silent
|
||||
flag.
|
||||
If the
|
||||
.B -t, --strict
|
||||
flag is used, the variable which is not on the whitelist is
|
||||
not displayed.
|
||||
|
||||
.TP
|
||||
.B controller
|
||||
defines the controller whose hierarchies will be
|
||||
output
|
||||
|
||||
.SH ENVIRONMENT VARIABLES
|
||||
.TP
|
||||
.B CGROUP_LOGLEVEL
|
||||
controls verbosity of the tool. Allowed values are \fBDEBUG\fR,
|
||||
\fBINFO\fR, \fBWARNING\fR or \fBERROR\fR.
|
||||
|
||||
.SH FILES
|
||||
.TP
|
||||
.B /etc/cgsnapshot_blacklist.conf
|
||||
default blacklist
|
||||
|
||||
.TP
|
||||
.B /etc/cgsnapshot_whitelist.conf
|
||||
default whitelist
|
||||
|
||||
.TP
|
||||
.B /etc/cgconfig.conf
|
||||
default libcgroup configuration file
|
||||
|
||||
.SH SEE ALSO
|
||||
cgconfig.conf (5)
|
31
libcgroup-0.41/doc/man/lscgroup.1
Normal file
31
libcgroup-0.41/doc/man/lscgroup.1
Normal file
@ -0,0 +1,31 @@
|
||||
.\" Copyright (C) 2009 Red Hat, Inc. All Rights Reserved.
|
||||
.\" Written by Ivana Hutarova Varekova <varekova@redhat.com>
|
||||
|
||||
.TH LSCGROUP 1 2009-11-05 "Linux" "libcgroup Manual"
|
||||
.SH NAME
|
||||
|
||||
lscgroup \- list all cgroups
|
||||
|
||||
.SH SYNOPSIS
|
||||
\fBlscgroup\fR [[\fB-g\fR] <\fIcontrollers>:<path\fR>] [...]
|
||||
.br
|
||||
\fBlscgroup\fR [\fB-h|--help\fR]
|
||||
|
||||
.SH DESCRIPTION
|
||||
List all/chosen cgroups.
|
||||
|
||||
.TP
|
||||
.B <controllers>:<path>
|
||||
defines the control groups whose subgroups will be shown.
|
||||
If this parameter is not used, the command will
|
||||
list all existing cgroups.
|
||||
|
||||
.SH ENVIRONMENT VARIABLES
|
||||
.TP
|
||||
.B CGROUP_LOGLEVEL
|
||||
controls verbosity of the tool. Allowed values are \fBDEBUG\fR,
|
||||
\fBINFO\fR, \fBWARNING\fR or \fBERROR\fR.
|
||||
|
||||
.SH SEE ALSO
|
||||
lssubsys (1), cgcreate (1), cgdelete (1),
|
||||
cgconfig.conf (5)
|
97
libcgroup-0.41/doc/man/lssubsys.1
Normal file
97
libcgroup-0.41/doc/man/lssubsys.1
Normal file
@ -0,0 +1,97 @@
|
||||
.\" Copyright (C) 2009 Red Hat, Inc. All Rights Reserved.
|
||||
.\" Written by Ivana Hutarova Varekova <varekova@redhat.com>
|
||||
|
||||
.TH LSSUBSYS 1 2009-11-05 "Linux" "libcgroup Manual"
|
||||
.SH NAME
|
||||
|
||||
lssubsys \- list hierarchies containing given subsystem
|
||||
|
||||
.SH SYNOPSIS
|
||||
\fBlssubsys\fR [\fB-m|--mount-points\fR] [\fB-M|--all-mount-points\fR]
|
||||
[\fIcontroller\fR] [...]
|
||||
.br
|
||||
\fBlssubsys\fR [\fB-m|--mount-points\fR] [\fB-M|--all-mount-points\fR]
|
||||
[\fB-i|--hierarchies\fR] [\fB-a|--all\fR]
|
||||
.br
|
||||
\fBlssubsys\fR [\fB-h|--help\fR]
|
||||
|
||||
.SH DESCRIPTION
|
||||
\fBlssubsys\fR list the hierarchies containing
|
||||
the given subsystem(s). If no subsystem is defined, it
|
||||
displays all mounted hierarchies.
|
||||
|
||||
.TP
|
||||
.B controller
|
||||
defines the subsystem whose hierarchy is shown.
|
||||
If this parameter is not used, the command will
|
||||
list all mounted subsystems.
|
||||
|
||||
.TP
|
||||
.B -m, --mount-points
|
||||
Display mount points. Only the first mount points of shown hierarchies are displayed.
|
||||
|
||||
.TP
|
||||
.B -M, --all-mount-points
|
||||
Display mount points. All mount points of shown hierarchies are displayed, each on
|
||||
separate line.
|
||||
|
||||
.TP
|
||||
.B -a, --all
|
||||
Display all subsystems (including unmounted ones).
|
||||
|
||||
.TP
|
||||
.B -i, --hierarchies
|
||||
Display the attached hierarchy number if the subsystem is in a hierarchy.
|
||||
If the option
|
||||
.B -m
|
||||
is also used, the hierarchy number is shown only for unmounted hierarchies.
|
||||
|
||||
.TP
|
||||
.B -h, --help
|
||||
Display help and exit.
|
||||
|
||||
.SH EXAMPLE
|
||||
The command
|
||||
.B lssubsys -am
|
||||
lists all subsystems which are present in the system,
|
||||
mounted ones will be shown with their mount point:
|
||||
.RS
|
||||
.nf
|
||||
$ lssubsys -am
|
||||
ns
|
||||
cpuset
|
||||
cpu,devices
|
||||
cpuacct /cgroup/cpuacct
|
||||
memory /cgroup/memory
|
||||
freezer /cgroup/freezer
|
||||
net_cls /cgroup/net_cls
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The command
|
||||
.B lssubsys -ami
|
||||
lists all subsystems which are present in the system,
|
||||
mounted subsystems are listed with their mount points,
|
||||
unmounted ones which are in a hierarchy are listed with their hierarchy number:
|
||||
.RS
|
||||
.nf
|
||||
$ lssubsys -ami
|
||||
ns
|
||||
cpuset 5
|
||||
cpu,devices 6
|
||||
cpuacct /cgroup/cpuacct
|
||||
memory /cgroup/memory
|
||||
freezer /cgroup/freezer
|
||||
net_cls /cgroup/net_cls
|
||||
.fi
|
||||
|
||||
.SH ENVIRONMENT VARIABLES
|
||||
.TP
|
||||
.B CGROUP_LOGLEVEL
|
||||
controls verbosity of the tool. Allowed values are \fBDEBUG\fR,
|
||||
\fBINFO\fR, \fBWARNING\fR or \fBERROR\fR.
|
||||
|
||||
.RE
|
||||
.SH SEE ALSO
|
||||
lscgroup (1), cgcreate (1), cgdelete (1),
|
||||
cgconfig.conf (5)
|
2
libcgroup-0.41/include/Makefile.am
Normal file
2
libcgroup-0.41/include/Makefile.am
Normal file
@ -0,0 +1,2 @@
|
||||
# Using 'nobase_', we what groups.h in /usr/include/libcgroup/ directory
|
||||
nobase_include_HEADERS = libcgroup.h libcgroup/error.h libcgroup/init.h libcgroup/groups.h libcgroup/tasks.h libcgroup/iterators.h libcgroup/config.h libcgroup/log.h
|
560
libcgroup-0.41/include/Makefile.in
Normal file
560
libcgroup-0.41/include/Makefile.in
Normal file
@ -0,0 +1,560 @@
|
||||
# Makefile.in generated by automake 1.13.4 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
VPATH = @srcdir@
|
||||
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = include
|
||||
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
|
||||
$(nobase_include_HEADERS)
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||
am__install_max = 40
|
||||
am__nobase_strip_setup = \
|
||||
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||
am__nobase_strip = \
|
||||
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||
am__nobase_list = $(am__nobase_strip_setup); \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||
if (++n[$$2] == $(am__install_max)) \
|
||||
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||
END { for (dir in files) print dir, files[dir] }'
|
||||
am__base_list = \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||
am__uninstall_files_from_dir = { \
|
||||
test -z "$$files" \
|
||||
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|
||||
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
|
||||
$(am__cd) "$$dir" && rm -f $$files; }; \
|
||||
}
|
||||
am__installdirs = "$(DESTDIR)$(includedir)"
|
||||
HEADERS = $(nobase_include_HEADERS)
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
# Read a list of newline-separated strings from the standard input,
|
||||
# and print each of them once, without duplicates. Input order is
|
||||
# *not* preserved.
|
||||
am__uniquify_input = $(AWK) '\
|
||||
BEGIN { nonempty = 0; } \
|
||||
{ items[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in items) print i; }; } \
|
||||
'
|
||||
# Make sure the list of sources is unique. This is necessary because,
|
||||
# e.g., the same source file might be shared among _SOURCES variables
|
||||
# for different programs/libraries.
|
||||
am__define_uniq_tagged_files = \
|
||||
list='$(am__tagged_files)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | $(am__uniquify_input)`
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
FGREP = @FGREP@
|
||||
GREP = @GREP@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LEX = @LEX@
|
||||
LEXLIB = @LEXLIB@
|
||||
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBRARY_VERSION_MAJOR = @LIBRARY_VERSION_MAJOR@
|
||||
LIBRARY_VERSION_MINOR = @LIBRARY_VERSION_MINOR@
|
||||
LIBRARY_VERSION_RELEASE = @LIBRARY_VERSION_RELEASE@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
REALLY_YACC = @REALLY_YACC@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
YACC = @YACC@
|
||||
YFLAGS = @YFLAGS@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pamlibdir = @pamlibdir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
|
||||
# Using 'nobase_', we what groups.h in /usr/include/libcgroup/ directory
|
||||
nobase_include_HEADERS = libcgroup.h libcgroup/error.h libcgroup/init.h libcgroup/groups.h libcgroup/tasks.h libcgroup/iterators.h libcgroup/config.h libcgroup/log.h
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign include/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign include/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
install-nobase_includeHEADERS: $(nobase_include_HEADERS)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list='$(nobase_include_HEADERS)'; test -n "$(includedir)" || list=; \
|
||||
if test -n "$$list"; then \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \
|
||||
fi; \
|
||||
$(am__nobase_list) | while read dir files; do \
|
||||
xfiles=; for file in $$files; do \
|
||||
if test -f "$$file"; then xfiles="$$xfiles $$file"; \
|
||||
else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \
|
||||
test -z "$$xfiles" || { \
|
||||
test "x$$dir" = x. || { \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(includedir)/$$dir'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(includedir)/$$dir"; }; \
|
||||
echo " $(INSTALL_HEADER) $$xfiles '$(DESTDIR)$(includedir)/$$dir'"; \
|
||||
$(INSTALL_HEADER) $$xfiles "$(DESTDIR)$(includedir)/$$dir" || exit $$?; }; \
|
||||
done
|
||||
|
||||
uninstall-nobase_includeHEADERS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(nobase_include_HEADERS)'; test -n "$(includedir)" || list=; \
|
||||
$(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \
|
||||
dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir)
|
||||
|
||||
ID: $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); mkid -fID $$unique
|
||||
tags: tags-am
|
||||
TAGS: tags
|
||||
|
||||
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
$(am__define_uniq_tagged_files); \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: ctags-am
|
||||
|
||||
CTAGS: ctags
|
||||
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
cscopelist: cscopelist-am
|
||||
|
||||
cscopelist-am: $(am__tagged_files)
|
||||
list='$(am__tagged_files)'; \
|
||||
case "$(srcdir)" in \
|
||||
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
||||
*) sdir=$(subdir)/$(srcdir) ;; \
|
||||
esac; \
|
||||
for i in $$list; do \
|
||||
if test -f "$$i"; then \
|
||||
echo "$(subdir)/$$i"; \
|
||||
else \
|
||||
echo "$$sdir/$$i"; \
|
||||
fi; \
|
||||
done >> $(top_builddir)/cscope.files
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(HEADERS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(includedir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-nobase_includeHEADERS
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-nobase_includeHEADERS
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
|
||||
clean-libtool cscopelist-am ctags ctags-am distclean \
|
||||
distclean-generic distclean-libtool distclean-tags distdir dvi \
|
||||
dvi-am html html-am info info-am install install-am \
|
||||
install-data install-data-am install-dvi install-dvi-am \
|
||||
install-exec install-exec-am install-html install-html-am \
|
||||
install-info install-info-am install-man \
|
||||
install-nobase_includeHEADERS install-pdf install-pdf-am \
|
||||
install-ps install-ps-am install-strip installcheck \
|
||||
installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-generic \
|
||||
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
|
||||
uninstall-am uninstall-nobase_includeHEADERS
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
49
libcgroup-0.41/include/libcgroup.h
Normal file
49
libcgroup-0.41/include/libcgroup.h
Normal file
@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright IBM Corporation. 2007
|
||||
*
|
||||
* Author: Balbir Singh <balbir@linux.vnet.ibm.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2.1 of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it would be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _LIBCGROUP_H
|
||||
#define _LIBCGROUP_H
|
||||
|
||||
#define _LIBCGROUP_H_INSIDE
|
||||
|
||||
#include <libcgroup/error.h>
|
||||
#include <libcgroup/init.h>
|
||||
#include <libcgroup/iterators.h>
|
||||
#include <libcgroup/groups.h>
|
||||
#include <libcgroup/tasks.h>
|
||||
#include <libcgroup/config.h>
|
||||
#include <libcgroup/log.h>
|
||||
|
||||
#undef _LIBCGROUP_H_INSIDE
|
||||
|
||||
/*! \mainpage libcgroup
|
||||
*
|
||||
* \section intro_sec Introduction
|
||||
*
|
||||
* @c libcgroup is a library that abstracts the control group file system in Linux.
|
||||
* It comes with various command-line tools and configuration files, see
|
||||
* their man pages for details.
|
||||
*
|
||||
* This documentation provides description of @c libcgroup API. Read following
|
||||
* sections, preferably in this order:
|
||||
* -# @ref group_init "Initialization"
|
||||
* -# @ref group_groups "Control Groups"
|
||||
* -# @ref group_iterators "Iterators"
|
||||
* -# @ref group_tasks "Manipulation with tasks"
|
||||
* -# @ref group_config "Configuration"
|
||||
* -# @ref group_errors "Error Handling"
|
||||
*/
|
||||
|
||||
#endif /* _LIBCGROUP_H */
|
112
libcgroup-0.41/include/libcgroup/config.h
Normal file
112
libcgroup-0.41/include/libcgroup/config.h
Normal file
@ -0,0 +1,112 @@
|
||||
#ifndef _LIBCGROUP_CONFIG_H
|
||||
#define _LIBCGROUP_CONFIG_H
|
||||
|
||||
#ifndef _LIBCGROUP_H_INSIDE
|
||||
#error "Only <libcgroup.h> should be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef SWIG
|
||||
#include <features.h>
|
||||
#endif
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
/**
|
||||
* @defgroup group_config 5. Configuration
|
||||
* @{
|
||||
*
|
||||
* @name Configuration file
|
||||
* @{
|
||||
*
|
||||
* @c libcgroup can mount and create control groups and set their parameters as
|
||||
* specified in a configuration file.
|
||||
*
|
||||
* @todo add this description?: These functions are mostly intended
|
||||
* to be used by internal @c libcgroup tools, however they are fully supported
|
||||
* and applications can benefit from them.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Load configuration file and mount and create control groups described there.
|
||||
* See cgconfig.conf man page for format of the file.
|
||||
* @param pathname Name of the configuration file to load.
|
||||
*/
|
||||
int cgroup_config_load_config(const char *pathname);
|
||||
|
||||
/**
|
||||
* Delete all control groups and unmount all hierarchies.
|
||||
*/
|
||||
int cgroup_unload_cgroups(void);
|
||||
|
||||
/**
|
||||
* Delete all cgroups and unmount all mount points defined in specified config
|
||||
* file.
|
||||
*
|
||||
* The groups are either removed recursively or only the empty ones, based
|
||||
* on given flags. Mount point are always umounted only if they are empty,
|
||||
* regardless of any flags.
|
||||
*
|
||||
* The groups are sorted before they are removed, so the removal of empty ones
|
||||
* actually works (i.e. subgroups are removed first).
|
||||
*
|
||||
* @param pathname Name of the configuration file to unload.
|
||||
* @param flags Combination of CGFLAG_DELETE_* flags, which indicate what and
|
||||
* how to delete.
|
||||
*/
|
||||
int cgroup_config_unload_config(const char *pathname, int flags);
|
||||
|
||||
/**
|
||||
* Sets default permissions of groups created by subsequent
|
||||
* cgroup_config_load_config() calls. If a config file contains a 'default {}'
|
||||
* section, the default permissions from the config file is then used.
|
||||
*
|
||||
* Use cgroup_new_cgroup() to create a dummy group and cgroup_set_uid_gid() and
|
||||
* cgroup_set_permissions() to set its permissions. Use NO_UID_GID instead of
|
||||
* GID/UID and NO_PERMS instead of file/directory permissions to let kernel
|
||||
* decide the default permissions where you don't want specific user and/or
|
||||
* permissions. Kernel then uses current user/group and permissions from umask
|
||||
* then.
|
||||
*
|
||||
* @param new_default New default permissions from this group are copied to
|
||||
* libcgroup internal structures. I.e., this group can be freed immediatelly
|
||||
* after this function returns.
|
||||
*/
|
||||
int cgroup_config_set_default(struct cgroup *new_default);
|
||||
|
||||
/**
|
||||
* Initializes the templates cache and load it from file pathname.
|
||||
*/
|
||||
int cgroup_init_templates_cache(char *pathname);
|
||||
|
||||
/**
|
||||
* Reloads the templates list from file pathname.
|
||||
*/
|
||||
int cgroup_reload_cached_templates(char *pathname);
|
||||
|
||||
/**
|
||||
* Physically create a new control group in kernel, based on given control
|
||||
* group template and configuration file. If given template is not set in
|
||||
* configuration file, then the procedure works create the control group
|
||||
* using cgroup_create_cgroup() function
|
||||
*
|
||||
* The flags can alter the behavior of this function:
|
||||
* CGFLAG_USE_TEMPLATE_CACHE: Use cached templates instead of
|
||||
* parsing the config file
|
||||
*
|
||||
* @param pathname Name of the configuration file with template definitions
|
||||
* @param cgroup Wanted control group - contains substitute name and wanted
|
||||
* controllers.
|
||||
* @param template_name Template name used for cgroup setting
|
||||
* @param flags Bit flags to change the behavior
|
||||
*/
|
||||
int cgroup_config_create_template_group(
|
||||
struct cgroup *cgroup, char *template_name,
|
||||
int flags);
|
||||
|
||||
/**
|
||||
* @}
|
||||
* @}
|
||||
*/
|
||||
__END_DECLS
|
||||
|
||||
#endif /*_LIBCGROUP_CONFIG_H*/
|
104
libcgroup-0.41/include/libcgroup/error.h
Normal file
104
libcgroup-0.41/include/libcgroup/error.h
Normal file
@ -0,0 +1,104 @@
|
||||
#ifndef _LIBCGROUP_ERROR_H
|
||||
#define _LIBCGROUP_ERROR_H
|
||||
|
||||
#ifndef _LIBCGROUP_H_INSIDE
|
||||
#error "Only <libcgroup.h> should be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef SWIG
|
||||
#include <features.h>
|
||||
#endif
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
/**
|
||||
* @defgroup group_errors 6. Error handling
|
||||
* @{
|
||||
*
|
||||
* @name Error handling
|
||||
* @{
|
||||
* Unless states otherwise in documentation of a function, all functions
|
||||
* return @c int, which is zero (0) when the function succeeds, and positive
|
||||
* number if the function fails.
|
||||
*
|
||||
* The returned integer is one of the ECG* values described below. Value
|
||||
* #ECGOTHER means that the error was caused by underlying OS and the real
|
||||
* cause can be found by calling cgroup_get_last_errno().
|
||||
*/
|
||||
|
||||
enum {
|
||||
ECGROUPNOTCOMPILED = 50000,
|
||||
ECGROUPNOTMOUNTED,
|
||||
ECGROUPNOTEXIST,
|
||||
ECGROUPNOTCREATED,
|
||||
ECGROUPSUBSYSNOTMOUNTED,
|
||||
ECGROUPNOTOWNER,
|
||||
/** Controllers bound to different mount points */
|
||||
ECGROUPMULTIMOUNTED,
|
||||
/* This is the stock error. Default error. @todo really? */
|
||||
ECGROUPNOTALLOWED,
|
||||
ECGMAXVALUESEXCEEDED,
|
||||
ECGCONTROLLEREXISTS,
|
||||
ECGVALUEEXISTS,
|
||||
ECGINVAL,
|
||||
ECGCONTROLLERCREATEFAILED,
|
||||
ECGFAIL,
|
||||
ECGROUPNOTINITIALIZED,
|
||||
ECGROUPVALUENOTEXIST,
|
||||
/**
|
||||
* Represents error coming from other libraries like glibc. @c libcgroup
|
||||
* users need to check cgroup_get_last_errno() upon encountering this
|
||||
* error.
|
||||
*/
|
||||
ECGOTHER,
|
||||
ECGROUPNOTEQUAL,
|
||||
ECGCONTROLLERNOTEQUAL,
|
||||
/** Failed to parse rules configuration file. */
|
||||
ECGROUPPARSEFAIL,
|
||||
/** Rules list does not exist. */
|
||||
ECGROUPNORULES,
|
||||
ECGMOUNTFAIL,
|
||||
/**
|
||||
* Not an real error, it just indicates that iterator has come to end
|
||||
* of sequence and no more items are left.
|
||||
*/
|
||||
ECGEOF = 50023,
|
||||
/** Failed to parse config file (cgconfig.conf). */
|
||||
ECGCONFIGPARSEFAIL,
|
||||
ECGNAMESPACEPATHS,
|
||||
ECGNAMESPACECONTROLLER,
|
||||
ECGMOUNTNAMESPACE,
|
||||
ECGROUPUNSUPP,
|
||||
ECGCANTSETVALUE,
|
||||
/** Removing of a group failed because it was not empty. */
|
||||
ECGNONEMPTY,
|
||||
};
|
||||
|
||||
/**
|
||||
* Legacy definition of ECGRULESPARSEFAIL error code.
|
||||
*/
|
||||
#define ECGRULESPARSEFAIL ECGROUPPARSEFAIL
|
||||
|
||||
/**
|
||||
* Format error code to a human-readable English string. No internationalization
|
||||
* is currently done. Returned pointer leads to @c libcgroup memory and
|
||||
* must not be freed nor modified. The memory is rewritten by subsequent
|
||||
* call to this function.
|
||||
* @param code Error code for which the corresponding error string is
|
||||
* returned. When #ECGOTHER is used, text with glibc's description of
|
||||
* cgroup_get_last_errno() value is returned.
|
||||
*/
|
||||
const char *cgroup_strerror(int code);
|
||||
|
||||
/**
|
||||
* Return last errno, which caused ECGOTHER error.
|
||||
*/
|
||||
int cgroup_get_last_errno(void);
|
||||
|
||||
/**
|
||||
* @}
|
||||
* @}
|
||||
*/
|
||||
__END_DECLS
|
||||
|
||||
#endif /* _LIBCGROUP_INIT_H */
|
582
libcgroup-0.41/include/libcgroup/groups.h
Normal file
582
libcgroup-0.41/include/libcgroup/groups.h
Normal file
@ -0,0 +1,582 @@
|
||||
#ifndef _LIBCGROUP_GROUPS_H
|
||||
#define _LIBCGROUP_GROUPS_H
|
||||
|
||||
#ifndef _LIBCGROUP_H_INSIDE
|
||||
#error "Only <libcgroup.h> should be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef SWIG
|
||||
#include <features.h>
|
||||
#include <sys/types.h>
|
||||
#include <stdbool.h>
|
||||
#endif
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
/**
|
||||
* Flags for cgroup_delete_cgroup_ext().
|
||||
*/
|
||||
enum cgroup_delete_flag {
|
||||
/**
|
||||
* Ignore errors caused by migration of tasks to parent group.
|
||||
*/
|
||||
CGFLAG_DELETE_IGNORE_MIGRATION = 1,
|
||||
|
||||
/**
|
||||
* Recursively delete all child groups.
|
||||
*/
|
||||
CGFLAG_DELETE_RECURSIVE = 2,
|
||||
|
||||
/**
|
||||
* Delete the cgroup only if it is empty, i.e. it has no subgroups and
|
||||
* no processes inside. This flag cannot be used with
|
||||
* CGFLAG_DELETE_RECURSIVE.
|
||||
*/
|
||||
CGFLAG_DELETE_EMPTY_ONLY = 4,
|
||||
};
|
||||
|
||||
/**
|
||||
* @defgroup group_groups 2. Group manipulation API
|
||||
* @{
|
||||
*
|
||||
* @name Basic infrastructure
|
||||
* @{
|
||||
* <tt>struct cgroup*</tt> is the heart of @c libcgroup API.
|
||||
* The structure is opaque to applications, all access to the structure is
|
||||
* through appropriate functions.
|
||||
*
|
||||
* The most important information is that <b> one <tt>struct cgroup*</tt> can
|
||||
* represent zero, one or more real control groups in kernel</b>.
|
||||
* The <tt>struct cgroup*</tt> is identified by name of the group, which must be
|
||||
* set by cgroup_new_cgroup(). Multiple controllers (aka subsystems) can be
|
||||
* attached to one <tt>struct cgroup*</tt> using cgroup_add_controller(). These
|
||||
* controllers <b>can belong to different hierarchies</b>.
|
||||
*
|
||||
* This approach is different to the one in the Linux kernel - a control group
|
||||
* must be part of exactly one hierarchy there. In @c libcgroup, a group can be
|
||||
* part of multiple hierarchies, as long as the group name is the same.
|
||||
*
|
||||
* @par Example:
|
||||
* Let there be following control groups:
|
||||
* @code
|
||||
* cpu,cpuacct:/
|
||||
* cpu,cpuacct:/foo
|
||||
* cpu,cpuacct:/bar
|
||||
* freezer:/
|
||||
* freezer:/foo
|
||||
* @endcode
|
||||
* I.e. there is @c cpu and @c cpuacct controller mounted together in one
|
||||
* hierarchy, with @c foo and @c bar groups. In addition, @c freezer is
|
||||
* mounted as separate hierarchy, with only one @c foo group.
|
||||
*
|
||||
* @par
|
||||
* Following code creates <tt>struct cgroup*</tt> structure, which represents
|
||||
* one group <tt>cpu,cpuacct:/foo</tt>:
|
||||
* @code
|
||||
* struct cgroup *foo = cgroup_new_cgroup("foo");
|
||||
* cgroup_add_controller(foo, "cpu");
|
||||
* @endcode
|
||||
* Now, you can call e.g. cgroup_delete_cgroup() and the group is deleted from
|
||||
* the hierarchy. You can note that it's enough to add only one controller to
|
||||
* the group to fully identify a group in <tt>cpu,cpuacct</tt> hierarchy.
|
||||
*
|
||||
* @par
|
||||
* Following code creates <tt>struct cgroup*</tt> structure, which represents
|
||||
* @b two groups, <tt>cpu,cpuacct:/foo</tt> and <tt>freezer:/foo</tt>:
|
||||
* @code
|
||||
* struct cgroup *foo = cgroup_new_cgroup("foo");
|
||||
* cgroup_add_controller(foo, "cpu");
|
||||
* cgroup_add_controller(foo, "freezer");
|
||||
* @endcode
|
||||
* Now, if you call e.g. cgroup_delete_cgroup(), the group gets deleted from
|
||||
* @b both hierarchies.
|
||||
*
|
||||
* @todo add some propaganda what's so great on this approach... I personally
|
||||
* think it is broken and confusing (see TODOs below).
|
||||
*
|
||||
* Following functions are provided to create/destroy various libcgroup
|
||||
* structures. Please note that none of these functions actually create or
|
||||
* delete a cgroup in kernel!
|
||||
*/
|
||||
|
||||
/**
|
||||
* @struct cgroup
|
||||
*
|
||||
* Structure describing one or more control groups. The structure is opaque to
|
||||
* applications.
|
||||
*/
|
||||
struct cgroup;
|
||||
|
||||
/**
|
||||
* @struct cgroup_controller
|
||||
* Structure describing a controller attached to one struct @c cgroup, including
|
||||
* parameters of the group and their values. The structure is opaque to
|
||||
* applications.
|
||||
* @see groups
|
||||
*/
|
||||
struct cgroup_controller;
|
||||
|
||||
/**
|
||||
* Uninitialized file/directory permissions used for task/control files.
|
||||
*/
|
||||
#define NO_PERMS (-1U)
|
||||
|
||||
/**
|
||||
* Uninitialized UID/GID used for task/control files.
|
||||
*/
|
||||
#define NO_UID_GID (-1U)
|
||||
|
||||
/**
|
||||
* Allocate new cgroup structure. This function itself does not create new
|
||||
* control group in kernel, only new <tt>struct cgroup</tt> inside libcgroup!
|
||||
*
|
||||
* @param name Path to the group, relative from root group. Use @c "/" or @c "."
|
||||
* for the root group itself and @c "/foo/bar/baz" or @c "foo/bar/baz" for
|
||||
* subgroups.
|
||||
* @todo suggest one preferred way, either "/foo" or "foo".
|
||||
* @returns Created group or NULL on error.
|
||||
*/
|
||||
struct cgroup *cgroup_new_cgroup(const char *name);
|
||||
|
||||
/**
|
||||
* Attach new controller to cgroup. This function just modifies internal
|
||||
* libcgroup structure, not the kernel control group.
|
||||
*
|
||||
* @param cgroup
|
||||
* @param name Name of the controller, e.g. "freezer".
|
||||
* @return Created controller or NULL on error.
|
||||
*/
|
||||
struct cgroup_controller *cgroup_add_controller(struct cgroup *cgroup,
|
||||
const char *name);
|
||||
|
||||
/**
|
||||
* Return appropriate controller from given group.
|
||||
* The controller must be added before using cgroup_add_controller() or loaded
|
||||
* from kernel using cgroup_get_cgroup().
|
||||
* @param cgroup
|
||||
* @param name Name of the controller, e.g. "freezer".
|
||||
*/
|
||||
struct cgroup_controller *cgroup_get_controller(struct cgroup *cgroup,
|
||||
const char *name);
|
||||
|
||||
/**
|
||||
* Free internal @c cgroup structure. This function frees also all controllers
|
||||
* attached to the @c cgroup, including all parameters and their values.
|
||||
* @param cgroup
|
||||
*/
|
||||
void cgroup_free(struct cgroup **cgroup);
|
||||
|
||||
/**
|
||||
* Free internal list of controllers from the group.
|
||||
* @todo should this function be public???
|
||||
* @param cgroup
|
||||
*/
|
||||
void cgroup_free_controllers(struct cgroup *cgroup);
|
||||
|
||||
|
||||
/**
|
||||
* @}
|
||||
* @name Group manipulation API
|
||||
* Using following functions you can create and remove control groups and
|
||||
* change their parameters.
|
||||
* @note All access to kernel is through previously mounted cgroup filesystems.
|
||||
* @c libcgroup does not mount/unmount anything for you.
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* Physically create a control group in kernel. The group is created in all
|
||||
* hierarchies, which cover controllers added by cgroup_add_controller().
|
||||
* All parameters set by cgroup_add_value_* functions are written.
|
||||
* The created groups has owner which was set by cgroup_set_uid_gid() and
|
||||
* permissions set by cgroup_set_permissions.
|
||||
* @param cgroup
|
||||
* @param ignore_ownership When nozero, all errors are ignored when setting
|
||||
* owner of the group and/or its tasks file.
|
||||
* @todo what is ignore_ownership good for?
|
||||
* @retval #ECGROUPNOTEQUAL if not all specified controller parameters
|
||||
* were successfully set.
|
||||
*/
|
||||
int cgroup_create_cgroup(struct cgroup *cgroup, int ignore_ownership);
|
||||
|
||||
/**
|
||||
* Physically create new control group in kernel, with all parameters and values
|
||||
* copied from its parent group. The group is created in all hierarchies, where
|
||||
* the parent group exists. I.e. following code creates subgroup in all
|
||||
* hierarchies, because all of them have root (=parent) group.
|
||||
* @code
|
||||
* struct cgroup *foo = cgroup_new_cgroup("foo");
|
||||
* cgroup_create_cgroup_from_parent(foo, 0);
|
||||
* @endcode
|
||||
* @todo what is this good for? Why the list of controllers added by
|
||||
* cgroup_add_controller() is not used, like in cgroup_create_cgroup()? I can't
|
||||
* crate subgroup of root group in just one hierarchy with this function!
|
||||
*
|
||||
* @param cgroup The cgroup to create. Only it's name is used, everything else
|
||||
* is discarded.
|
||||
* @param ignore_ownership When nozero, all errors are ignored when setting
|
||||
* owner of the group and/or its tasks file.
|
||||
* @todo what is ignore_ownership good for?
|
||||
* @retval #ECGROUPNOTEQUAL if not all inherited controller parameters
|
||||
* were successfully set (this is expected).
|
||||
*/
|
||||
int cgroup_create_cgroup_from_parent(struct cgroup *cgroup,
|
||||
int ignore_ownership);
|
||||
|
||||
/**
|
||||
* Physically modify a control group in kernel. All parameters added by
|
||||
* cgroup_add_value_ or cgroup_set_value_ are written.
|
||||
* Currently it's not possible to change and owner of a group.
|
||||
*
|
||||
* @param cgroup
|
||||
*/
|
||||
int cgroup_modify_cgroup(struct cgroup *cgroup);
|
||||
|
||||
/**
|
||||
* Physically remove a control group from kernel. The group is removed from
|
||||
* all hierarchies, which cover controllers added by cgroup_add_controller()
|
||||
* or cgroup_get_cgroup(). All tasks inside the group are automatically moved
|
||||
* to parent group.
|
||||
*
|
||||
* The group being removed must be empty, i.e. without subgroups. Use
|
||||
* cgroup_delete_cgroup_ext() for recursive delete.
|
||||
*
|
||||
* @param cgroup
|
||||
* @param ignore_migration When nozero, all errors are ignored when migrating
|
||||
* tasks from the group to the parent group.
|
||||
* @todo what is ignore_migration good for? rmdir() will fail if tasks were not moved.
|
||||
*/
|
||||
int cgroup_delete_cgroup(struct cgroup *cgroup, int ignore_migration);
|
||||
|
||||
/**
|
||||
* Physically remove a control group from kernel.
|
||||
* All tasks are automatically moved to parent group.
|
||||
* If #CGFLAG_DELETE_IGNORE_MIGRATION flag is used, the errors that occurred
|
||||
* during the task movement are ignored.
|
||||
* #CGFLAG_DELETE_RECURSIVE flag specifies that all subgroups should be removed
|
||||
* too. If root group is being removed with this flag specified, all subgroups
|
||||
* are removed but the root group itself is left undeleted.
|
||||
* @see cgroup_delete_flag.
|
||||
*
|
||||
* @param cgroup
|
||||
* @param flags Combination of CGFLAG_DELETE_* flags, which indicate what and
|
||||
* how to delete.
|
||||
*/
|
||||
int cgroup_delete_cgroup_ext(struct cgroup *cgroup, int flags);
|
||||
|
||||
|
||||
/**
|
||||
* @}
|
||||
* @name Other functions
|
||||
* @{
|
||||
* Helper functions to manipulate with control groups.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Read all information regarding the group from kernel.
|
||||
* Based on name of the group, list of controllers and all parameters and their
|
||||
* values are read from all hierarchies, where a group with given name exists.
|
||||
* All existing controllers are replaced. I.e. following code will fill @c root
|
||||
* with controllers from all hierarchies, because the root group is available in
|
||||
* all of them.
|
||||
* @code
|
||||
* struct cgroup *root = cgroup_new_cgroup("/");
|
||||
* cgroup_get_cgroup(root);
|
||||
* @endcode
|
||||
*
|
||||
* @todo what is this function good for? Why is not considered only the list of
|
||||
* controllers attached by cgroup_add_controller()? What owners will return
|
||||
* cgroup_get_uid_gid() if the group is in multiple hierarchies, each with
|
||||
* different owner of tasks file?
|
||||
*
|
||||
* @param cgroup The cgroup to load. Only it's name is used, everything else
|
||||
* is replaced.
|
||||
*/
|
||||
int cgroup_get_cgroup(struct cgroup *cgroup);
|
||||
|
||||
/**
|
||||
* Copy all controllers, their parameters and values. Group name, permissions
|
||||
* and ownerships are not coppied. All existing controllers
|
||||
* in the source group are discarded.
|
||||
*
|
||||
* @param dst Destination group.
|
||||
* @param src Source group.
|
||||
*/
|
||||
int cgroup_copy_cgroup(struct cgroup *dst, struct cgroup *src);
|
||||
|
||||
/**
|
||||
* Compare names, owners, controllers, parameters and values of two groups.
|
||||
*
|
||||
* @param cgroup_a
|
||||
* @param cgroup_b
|
||||
*
|
||||
* @retval 0 if the groups are the same.
|
||||
* @retval #ECGROUPNOTEQUAL if the groups are not the same.
|
||||
* @retval #ECGCONTROLLERNOTEQUAL if the only difference are controllers,
|
||||
* parameters or their values.
|
||||
*/
|
||||
int cgroup_compare_cgroup(struct cgroup *cgroup_a, struct cgroup *cgroup_b);
|
||||
|
||||
|
||||
/**
|
||||
* Compare names, parameters and values of two controllers.
|
||||
*
|
||||
* @param cgca
|
||||
* @param cgcb
|
||||
*
|
||||
* @retval 0 if the controllers are the same.
|
||||
* @retval #ECGCONTROLLERNOTEQUAL if the controllers are not equal.
|
||||
*/
|
||||
int cgroup_compare_controllers(struct cgroup_controller *cgca,
|
||||
struct cgroup_controller *cgcb);
|
||||
|
||||
/**
|
||||
* Set owner of the group control files and the @c tasks file. This function
|
||||
* modifies only @c libcgroup internal @c cgroup structure, use
|
||||
* cgroup_create_cgroup() afterwards to create the group with given owners.
|
||||
*
|
||||
* @param cgroup
|
||||
* @param tasks_uid UID of the owner of group's @c tasks file.
|
||||
* @param tasks_gid GID of the owner of group's @c tasks file.
|
||||
* @param control_uid UID of the owner of group's control files (i.e.
|
||||
* parameters).
|
||||
* @param control_gid GID of the owner of group's control files (i.e.
|
||||
* parameters).
|
||||
*/
|
||||
int cgroup_set_uid_gid(struct cgroup *cgroup, uid_t tasks_uid, gid_t tasks_gid,
|
||||
uid_t control_uid, gid_t control_gid);
|
||||
|
||||
/**
|
||||
* Return owners of the group's @c tasks file and control files.
|
||||
* The data is read from @c libcgroup internal @c cgroup structure, use
|
||||
* cgroup_set_uid_gid() or cgroup_get_cgroup() to fill it.
|
||||
*/
|
||||
int cgroup_get_uid_gid(struct cgroup *cgroup, uid_t *tasks_uid,
|
||||
gid_t *tasks_gid, uid_t *control_uid, gid_t *control_gid);
|
||||
|
||||
/**
|
||||
* Stores given file permissions of the group's control and tasks files
|
||||
* into the @c cgroup data structure. Use NO_PERMS if permissions shouldn't
|
||||
* be changed or a value which applicable to chmod(2). Please note that
|
||||
* the given permissions are masked with the file owner's permissions.
|
||||
* For example if a control file has permissions 640 and control_fperm is
|
||||
* 471 the result will be 460.
|
||||
* @param cgroup
|
||||
* @param control_dperm Directory permission for the group.
|
||||
* @param control_fperm File permission for the control files.
|
||||
* @param task_fperm File permissions for task file.
|
||||
*/
|
||||
void cgroup_set_permissions(struct cgroup *cgroup,
|
||||
mode_t control_dperm, mode_t control_fperm,
|
||||
mode_t task_fperm);
|
||||
|
||||
/**
|
||||
* @}
|
||||
* @name Group parameters
|
||||
* These are functions can read or modify parameter of a group.
|
||||
* @note All these functions read/write parameters to @c libcgorup internal
|
||||
* structures. Use cgroup_get_cgroup() to load parameters from kernel to these
|
||||
* internal structures and cgroup_modify_cgroup() or cgroup_create_cgroup() to
|
||||
* write changes to kernel.
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* Add parameter and its value to internal @c libcgroup structures.
|
||||
* Use cgroup_modify_cgroup() or cgroup_create_cgroup() to write it to kernel.
|
||||
*
|
||||
* @param controller
|
||||
* @param name Name of the parameter.
|
||||
* @param value
|
||||
*
|
||||
*/
|
||||
int cgroup_add_value_string(struct cgroup_controller *controller,
|
||||
const char *name, const char *value);
|
||||
/**
|
||||
* Add parameter and its value to internal @c libcgroup structures.
|
||||
* Use cgroup_modify_cgroup() or cgroup_create_cgroup() to write it to kernel.
|
||||
* Content of the value is copied to internal structures and is not needed
|
||||
* after return from the function.
|
||||
*
|
||||
* @param controller
|
||||
* @param name Name of the parameter.
|
||||
* @param value
|
||||
*
|
||||
*/
|
||||
int cgroup_add_value_int64(struct cgroup_controller *controller,
|
||||
const char *name, int64_t value);
|
||||
/**
|
||||
* Add parameter and its value to internal @c libcgroup structures.
|
||||
* Use cgroup_modify_cgroup() or cgroup_create_cgroup() to write it to kernel.
|
||||
*
|
||||
* @param controller
|
||||
* @param name Name of the parameter.
|
||||
* @param value
|
||||
*
|
||||
*/
|
||||
int cgroup_add_value_uint64(struct cgroup_controller *controller,
|
||||
const char *name, u_int64_t value);
|
||||
/**
|
||||
* Add parameter and its value to internal @c libcgroup structures.
|
||||
* Use cgroup_modify_cgroup() or cgroup_create_cgroup() to write it to kernel.
|
||||
*
|
||||
* @param controller
|
||||
* @param name Name of the parameter.
|
||||
* @param value
|
||||
*
|
||||
*/
|
||||
int cgroup_add_value_bool(struct cgroup_controller *controller,
|
||||
const char *name, bool value);
|
||||
|
||||
/**
|
||||
* Read a parameter value from @c libcgroup internal structures.
|
||||
* Use @c cgroup_get_cgroup() to fill these structures with data from kernel.
|
||||
* It's up to the caller to free returned value.
|
||||
*
|
||||
* This function works only for 'short' parameters. Use
|
||||
* cgroup_read_stats_begin(), cgroup_read_stats_next() and
|
||||
* cgroup_read_stats_end() to read @c stats parameter, which can be longer
|
||||
* than libcgroup's internal buffers.
|
||||
* @todo rephrase, it's too vague... How big is the buffer actually?
|
||||
*
|
||||
* @param controller
|
||||
* @param name Name of the parameter.
|
||||
* @param value
|
||||
*/
|
||||
int cgroup_get_value_string(struct cgroup_controller *controller,
|
||||
const char *name, char **value);
|
||||
/**
|
||||
* Read a parameter value from @c libcgroup internal structures.
|
||||
* Use @c cgroup_get_cgroup() to fill these structures with data from kernel.
|
||||
*
|
||||
* @param controller
|
||||
* @param name Name of the parameter.
|
||||
* @param value
|
||||
*/
|
||||
int cgroup_get_value_int64(struct cgroup_controller *controller,
|
||||
const char *name, int64_t *value);
|
||||
/**
|
||||
* Read a parameter value from @c libcgroup internal structures.
|
||||
* Use @c cgroup_get_cgroup() to fill these structures with data from kernel.
|
||||
*
|
||||
* @param controller
|
||||
* @param name Name of the parameter.
|
||||
* @param value
|
||||
*/
|
||||
int cgroup_get_value_uint64(struct cgroup_controller *controller,
|
||||
const char *name, u_int64_t *value);
|
||||
/**
|
||||
* Read a parameter value from @c libcgroup internal structures.
|
||||
* Use @c cgroup_get_cgroup() to fill these structures with data from kernel.
|
||||
*
|
||||
* @param controller
|
||||
* @param name Name of the parameter.
|
||||
* @param value
|
||||
*/
|
||||
int cgroup_get_value_bool(struct cgroup_controller *controller,
|
||||
const char *name, bool *value);
|
||||
|
||||
/**
|
||||
* Set a parameter value in @c libcgroup internal structures.
|
||||
* Use cgroup_modify_cgroup() or cgroup_create_cgroup() to write it to kernel.
|
||||
*
|
||||
* @param controller
|
||||
* @param name Name of the parameter.
|
||||
* @param value
|
||||
*/
|
||||
int cgroup_set_value_string(struct cgroup_controller *controller,
|
||||
const char *name, const char *value);
|
||||
/**
|
||||
* Set a parameter value in @c libcgroup internal structures.
|
||||
* Use cgroup_modify_cgroup() or cgroup_create_cgroup() to write it to kernel.
|
||||
* Content of the value is copied to internal structures and is not needed
|
||||
* after return from the function.
|
||||
*
|
||||
* @param controller
|
||||
* @param name Name of the parameter.
|
||||
* @param value
|
||||
*/
|
||||
int cgroup_set_value_int64(struct cgroup_controller *controller,
|
||||
const char *name, int64_t value);
|
||||
/**
|
||||
* Set a parameter value in @c libcgroup internal structures.
|
||||
* Use cgroup_modify_cgroup() or cgroup_create_cgroup() to write it to kernel.
|
||||
*
|
||||
* @param controller
|
||||
* @param name Name of the parameter.
|
||||
* @param value
|
||||
*/
|
||||
int cgroup_set_value_uint64(struct cgroup_controller *controller,
|
||||
const char *name, u_int64_t value);
|
||||
/**
|
||||
* Set a parameter value in @c libcgroup internal structures.
|
||||
* Use cgroup_modify_cgroup() or cgroup_create_cgroup() to write it to kernel.
|
||||
*
|
||||
* @param controller
|
||||
* @param name Name of the parameter.
|
||||
* @param value
|
||||
*/
|
||||
int cgroup_set_value_bool(struct cgroup_controller *controller,
|
||||
const char *name, bool value);
|
||||
/**
|
||||
* Return the number of variables for the specified controller in @c libcgroup
|
||||
* internal structures. Use cgroup_get_cgroup() to fill these structures with
|
||||
* data from kernel. Use this function together with cgroup_get_value_name()
|
||||
* to list all parameters of a group.
|
||||
*
|
||||
* @param controller
|
||||
* @return Count of the parameters or -1 on error.
|
||||
*/
|
||||
int cgroup_get_value_name_count(struct cgroup_controller *controller);
|
||||
|
||||
/**
|
||||
* Return the name of parameter of controller at given index.
|
||||
* The index goes from 0 to cgroup_get_value_name_count()-1.
|
||||
* Use this function to list all parameter of the controller.
|
||||
*
|
||||
* @note The returned value is pointer to internal @c libcgroup structure,
|
||||
* do not free it.
|
||||
*
|
||||
* @param controller
|
||||
* @param index Index of the parameter.
|
||||
* @return Name of the parameter.
|
||||
*/
|
||||
char *cgroup_get_value_name(struct cgroup_controller *controller, int index);
|
||||
|
||||
/**
|
||||
* Get the list of process in a cgroup. This list is guaranteed to
|
||||
* be sorted. It is not necessary that it is unique.
|
||||
* @param name The name of the cgroup
|
||||
* @param controller The name of the controller
|
||||
* @param pids The list of pids. Should be uninitialized when passed
|
||||
* to the API. Should be freed by the caller using free.
|
||||
* @param size The size of the pids array returned by the API.
|
||||
*/
|
||||
int cgroup_get_procs(char *name, char *controller, pid_t **pids, int *size);
|
||||
|
||||
/**
|
||||
* Change permission of files and directories of given group
|
||||
* @param cgroup The cgroup which permissions should be changed
|
||||
* @param dir_mode The permission mode of group directory
|
||||
* @param dirm_change Denotes whether the directory change should be done
|
||||
* @param file_mode The permission mode of group files
|
||||
* @param filem_change Denotes whether the directory change should be done
|
||||
*/
|
||||
int cg_chmod_recursive(struct cgroup *cgroup, mode_t dir_mode,
|
||||
int dirm_change, mode_t file_mode, int filem_change);
|
||||
|
||||
/**
|
||||
* Get the name of the cgroup from a given cgroup
|
||||
* @param cgroup The cgroup whose name is needed
|
||||
*/
|
||||
char *cgroup_get_cgroup_name(struct cgroup *cgroup);
|
||||
|
||||
/**
|
||||
* @}
|
||||
* @}
|
||||
*/
|
||||
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* _LIBCGROUP_GROUPS_H */
|
63
libcgroup-0.41/include/libcgroup/init.h
Normal file
63
libcgroup-0.41/include/libcgroup/init.h
Normal file
@ -0,0 +1,63 @@
|
||||
#ifndef _LIBCGROUP_INIT_H
|
||||
#define _LIBCGROUP_INIT_H
|
||||
|
||||
#ifndef _LIBCGROUP_H_INSIDE
|
||||
#error "Only <libcgroup.h> should be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef SWIG
|
||||
#include <features.h>
|
||||
#endif
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
/**
|
||||
* @defgroup group_init 1. Initialization
|
||||
* @{
|
||||
*
|
||||
* @name Initialization
|
||||
* @{
|
||||
* Application must initialize @c libcgroup using cgroup_init() before any
|
||||
* other @c libcgroup function can be called. @c libcgroup caches information
|
||||
* about mounted hierarchies (just what's mounted where, not the control groups
|
||||
* themselves) at this time. There is currently no way to refresh this cache,
|
||||
* i.e. all subsequent mounts/remounts/unmounts are not reflected in this cache
|
||||
* and @c libcgroup may produce unexpected results.
|
||||
*
|
||||
* In addition, there is no way how to clean the cache on application exit.
|
||||
*
|
||||
* @todo this is very bad... There should be at least way how to refresh the
|
||||
* cache and/or an option to refresh it automatically (does kernel provide
|
||||
* any indication, when a filesystem is mounted/unmounted?). Dtto the cleanup
|
||||
* on exit.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Initialize libcgroup. Information about mounted hierarchies are examined
|
||||
* and cached internally (just what's mounted where, not the groups themselves).
|
||||
*
|
||||
* If the cgroup logging was not set using cgroup_set_logger() or
|
||||
* cgroup_set_default_logger() before calling cgroup_init(), the default logger
|
||||
* is automatically set, logging CGROUP_LOG_ERROR messages.
|
||||
*/
|
||||
int cgroup_init(void);
|
||||
|
||||
/**
|
||||
* Returns path where is mounted given controller. Applications should rely on
|
||||
* @c libcgroup API and not call this function directly.
|
||||
* Only the first mount point is returned, use
|
||||
* cgroup_get_subsys_mount_point_begin(), cgroup_get_subsys_mount_point_next()
|
||||
* and cgroup_get_subsys_mount_point_end() to get all of them.
|
||||
* @param controller Name of the controller
|
||||
* @param mount_point The string where the mount point location is stored.
|
||||
* Please note, the caller must free the mount_point.
|
||||
*/
|
||||
int cgroup_get_subsys_mount_point(const char *controller, char **mount_point);
|
||||
|
||||
/**
|
||||
* @}
|
||||
* @}
|
||||
*/
|
||||
__END_DECLS
|
||||
|
||||
#endif /* _LIBCGROUP_INIT_H */
|
428
libcgroup-0.41/include/libcgroup/iterators.h
Normal file
428
libcgroup-0.41/include/libcgroup/iterators.h
Normal file
@ -0,0 +1,428 @@
|
||||
#ifndef _LIBCGROUP_ITERATORS_H
|
||||
#define _LIBCGROUP_ITERATORS_H
|
||||
|
||||
#ifndef _LIBCGROUP_H_INSIDE
|
||||
#error "Only <libcgroup.h> should be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef SWIG
|
||||
#include <sys/types.h>
|
||||
#include <stdio.h>
|
||||
#include <features.h>
|
||||
#endif
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
/**
|
||||
* @defgroup group_iterators 3. Iterators
|
||||
* @{
|
||||
* So-called iterators are a code pattern to retrieve various data from
|
||||
* libcgroup in distinct chunks, for example when an application needs to read
|
||||
* list of groups in a hierarchy, it uses iterator to get one group at a time.
|
||||
* Iterator is opaque to the application, the application sees only
|
||||
* <tt>void* handle</tt> pointer, which is managed internally by @c libcgroup.
|
||||
* Each iterator provides at least these functions:
|
||||
* - <tt>int <i>iterator_name</i>_begin(void **handle, my_type *item)</tt>
|
||||
* - Initialize the iterator, store pointer to it into the @c handle.
|
||||
* - Return the first element in the iterator, let's say it's @c my_type.
|
||||
* - Return @c 0, if the operation succeeded.
|
||||
* - Return #ECGEOF, if the operation succeeded, but the iterator is empty.
|
||||
* The value of @c item is undefined in this case.
|
||||
* - Return any other error code on error.
|
||||
* - <tt>int <i>iterator_name</i>_next(void **handle, my_type *item)</tt>
|
||||
* - Advance to next element in the iterator and return it.
|
||||
* - Return @c 0, if the operation succeeded.
|
||||
* - Return #ECGEOF, if there is no item to advance to, i.e. the iterator
|
||||
* is already at its end. The value of @c item is undefined in this case.
|
||||
* - Return any other error code on error.
|
||||
* - <tt>void <i>iterator_name</i>_end(void **handle)</tt>
|
||||
* - Free any data associated with the iterator. This function must be
|
||||
* called even when <tt><i>iterator_name</i>_begin()</tt> fails.
|
||||
*
|
||||
* @todo not all iterators follow this pattern, e.g. cgroup_walk_tree_begin()
|
||||
* can result both in a state that cgroup_walk_tree_end() is not needed
|
||||
* and will sigsegv and in a state that cgroup_walk_tree_end() is needed
|
||||
* to free allocated memory. Complete review is needed!
|
||||
* @par Example of iterator usage:
|
||||
* @code
|
||||
* void *handle; // our iterator handle
|
||||
* my_type item; // the data returned by the iterator
|
||||
* int ret;
|
||||
* ret = iterator_name_begin(&handle, &item);
|
||||
* while (ret == 0) {
|
||||
* // process the item here
|
||||
* ret = iterator_name_begin(&handle, &item);
|
||||
* }
|
||||
* if (ret != ECGEOF) {
|
||||
* // process the error here
|
||||
* }
|
||||
* iterator_name_end(&handle);
|
||||
* @endcode
|
||||
*
|
||||
* @name Walk through control group filesystem
|
||||
* @{
|
||||
* This iterator returns all subgroups of given control group. It can be used
|
||||
* to return all groups in given hierarchy, when root control group is provided.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Type of the walk.
|
||||
*/
|
||||
enum cgroup_walk_type {
|
||||
/**
|
||||
* Pre-order directory walk, return a directory first and then its
|
||||
* subdirectories.
|
||||
* E.g. directories would be returned in this order:
|
||||
* @code
|
||||
* /
|
||||
* /group
|
||||
* /group/subgroup1
|
||||
* /group/subgroup1/subsubgroup
|
||||
* /group/subgroup2
|
||||
* @endcode
|
||||
*/
|
||||
CGROUP_WALK_TYPE_PRE_DIR = 0x1,
|
||||
/**
|
||||
* Post-order directory walk, return subdirectories of a directory
|
||||
* first and then the directory itself.
|
||||
* E.g. directories would be returned in this order:
|
||||
* @code
|
||||
* /group/subgroup1/subsubgroup
|
||||
* /group/subgroup1
|
||||
* /group/subgroup2
|
||||
* /group
|
||||
* /
|
||||
* @endcode
|
||||
*/
|
||||
CGROUP_WALK_TYPE_POST_DIR = 0x2,
|
||||
};
|
||||
|
||||
/**
|
||||
* Type of returned entity.
|
||||
*/
|
||||
enum cgroup_file_type {
|
||||
CGROUP_FILE_TYPE_FILE, /**< File. */
|
||||
CGROUP_FILE_TYPE_DIR, /**< Directory. */
|
||||
CGROUP_FILE_TYPE_OTHER, /**< Directory. @todo really? */
|
||||
};
|
||||
|
||||
/**
|
||||
* Information about found directory (= a control group).
|
||||
*/
|
||||
struct cgroup_file_info {
|
||||
/** Type of the entity. */
|
||||
enum cgroup_file_type type;
|
||||
/** Name of the entity. */
|
||||
const char *path;
|
||||
/** Name of its parent. */
|
||||
const char *parent;
|
||||
/**
|
||||
* Full path to the entity. To get path relative to the root of the
|
||||
* walk, you must store its @c full_path (or its length)
|
||||
* and calculate the relative path by yourself.
|
||||
*/
|
||||
const char *full_path;
|
||||
/**
|
||||
* Depth of the entity, how many directories below the root of
|
||||
* walk it is.
|
||||
*/
|
||||
short depth;
|
||||
};
|
||||
|
||||
/**
|
||||
* Walk through the directory tree for the specified controller.
|
||||
* The directory representing @c base_path is returned in @c info.
|
||||
* Use cgroup_walk_tree_set_flags() to specify, in which order should be next
|
||||
* directories returned.
|
||||
* @param controller Name of the controller, for which we want to walk
|
||||
* the directory tree.
|
||||
* @param base_path Begin walking from this path. Use "/" to walk through
|
||||
* full hierarchy.
|
||||
* @param depth The maximum depth to which the function should walk, 0
|
||||
* implies all the way down.
|
||||
* @param handle Handle to be used during iteration.
|
||||
* @param info Info filled and returned about directory information.
|
||||
* @param base_level Opaque integer which you must pass to subsequent
|
||||
* cgroup_walk_tree_next.
|
||||
* @todo why base_level is not hidden in **handle?
|
||||
* @return #ECGEOF when there is no node.
|
||||
*/
|
||||
int cgroup_walk_tree_begin(const char *controller, const char *base_path, int depth,
|
||||
void **handle, struct cgroup_file_info *info,
|
||||
int *base_level);
|
||||
/**
|
||||
* Get the next directory in the walk.
|
||||
* @param depth The maximum depth to which the function should walk, 0
|
||||
* implies all the way down.
|
||||
* @param handle Handle to be used during iteration.
|
||||
* @param info Info filled and returned about the next directory.
|
||||
* @param base_level Value of base_level returned by cgroup_walk_tree_begin().
|
||||
* @return #ECGEOF when we are done walking through the nodes.
|
||||
*/
|
||||
int cgroup_walk_tree_next(int depth, void **handle,
|
||||
struct cgroup_file_info *info, int base_level);
|
||||
|
||||
/**
|
||||
* Release the iterator.
|
||||
*/
|
||||
int cgroup_walk_tree_end(void **handle);
|
||||
|
||||
/**
|
||||
* Set the flags for walk_tree. Currently available flags are in
|
||||
* #cgroup_walk_type enum.
|
||||
* @param handle Handle of the iterator.
|
||||
* @param flags
|
||||
*/
|
||||
int cgroup_walk_tree_set_flags(void **handle, int flags);
|
||||
|
||||
/**
|
||||
* Read the value of the given variable for the specified
|
||||
* controller and control group.
|
||||
* The value is read up to newline character or at most max-1 characters,
|
||||
* whichever comes first (i.e. similar to fgets()).
|
||||
* @param controller Name of the controller for which stats are requested.
|
||||
* @param path Path to control group, relative to hierarchy root.
|
||||
* @param name is variable name.
|
||||
* @param handle Handle to be used during iteration.
|
||||
* @param buffer Buffer to read the value into.
|
||||
* The buffer is always zero-terminated.
|
||||
* @param max Maximal lenght of the buffer
|
||||
* @return #ECGEOF when the stats file is empty.
|
||||
*/
|
||||
|
||||
int cgroup_read_value_begin(const char *controller, const char *path,
|
||||
char *name, void **handle, char *buffer, int max);
|
||||
|
||||
/**
|
||||
* Read the next string from the given variable handle
|
||||
* which is generated by cgroup_read_stats_begin() function.
|
||||
* the value is read up to newline character or at most max-1 characters,
|
||||
* whichever comes first (i.e. similar to fgets()) per
|
||||
* cgroup_read_stats_next() call
|
||||
* @param handle Handle to be used during iteration.
|
||||
* @param data returned the string.
|
||||
* @param buffer Buffer to read the value into.
|
||||
* The buffer is always zero-terminated.
|
||||
* @param max Maximal lenght of the buffer
|
||||
* @return #ECGEOF when the iterator finishes getting the list of stats.
|
||||
*/
|
||||
int cgroup_read_value_next(void **handle, char *buffer, int max);
|
||||
|
||||
/**
|
||||
* Release the iterator.
|
||||
*/
|
||||
int cgroup_read_value_end(void **handle);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*
|
||||
* @name Read group stats
|
||||
* libcgroup's cgroup_get_value_string() reads only relatively short parametrs
|
||||
* of a group. Use following functions to read @c stats parameter, which can
|
||||
* be quite long.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Maximum length of a value in stats file.
|
||||
*/
|
||||
#define CG_VALUE_MAX 100
|
||||
/**
|
||||
* One item in stats file.
|
||||
*/
|
||||
struct cgroup_stat {
|
||||
char name[FILENAME_MAX];
|
||||
char value[CG_VALUE_MAX];
|
||||
};
|
||||
|
||||
/**
|
||||
* Read the statistics values (= @c stats parameter) for the specified
|
||||
* controller and control group. One line is returned per
|
||||
* cgroup_read_stats_begin() and cgroup_read_stats_next() call.
|
||||
* @param controller Name of the controller for which stats are requested.
|
||||
* @param path Path to control group, relative to hierarchy root.
|
||||
* @param handle Handle to be used during iteration.
|
||||
* @param stat Returned first item in the stats file.
|
||||
* @return #ECGEOF when the stats file is empty.
|
||||
*/
|
||||
int cgroup_read_stats_begin(const char *controller, const char *path, void **handle,
|
||||
struct cgroup_stat *stat);
|
||||
|
||||
/**
|
||||
* Read the next stat value.
|
||||
* @param handle Handle to be used during iteration.
|
||||
* @param stat Returned next item in the stats file.
|
||||
* @return #ECGEOF when the iterator finishes getting the list of stats.
|
||||
*/
|
||||
int cgroup_read_stats_next(void **handle, struct cgroup_stat *stat);
|
||||
|
||||
/**
|
||||
* Release the iterator.
|
||||
*/
|
||||
int cgroup_read_stats_end(void **handle);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*
|
||||
* @name List all tasks in a group
|
||||
* Use following functions to read @c tasks file of a group.
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* Read the tasks file to get the list of tasks in a cgroup.
|
||||
* @param cgroup Name of the cgroup.
|
||||
* @param controller Name of the cgroup subsystem.
|
||||
* @param handle Handle to be used in the iteration.
|
||||
* @param pid The pid read from the tasks file.
|
||||
* @return #ECGEOF when the group does not contain any tasks.
|
||||
*/
|
||||
int cgroup_get_task_begin(const char *cgroup, const char *controller, void **handle,
|
||||
pid_t *pid);
|
||||
|
||||
/**
|
||||
* Read the next task value.
|
||||
* @param handle The handle used for iterating.
|
||||
* @param pid The variable where the value will be stored.
|
||||
*
|
||||
* @return #ECGEOF when the iterator finishes getting the list of tasks.
|
||||
*/
|
||||
int cgroup_get_task_next(void **handle, pid_t *pid);
|
||||
|
||||
/**
|
||||
* Release the iterator.
|
||||
*/
|
||||
int cgroup_get_task_end(void **handle);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*
|
||||
* @name List mounted controllers
|
||||
* Use following function to list mounted controllers and to see, how they
|
||||
* are mounted together in hierarchies.
|
||||
* Use cgroup_get_all_controller_begin() (see later) to list all controllers,
|
||||
* including those which are not mounted.
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* Information about mounted controller.
|
||||
*/
|
||||
struct cgroup_mount_point {
|
||||
/** Name of the controller. */
|
||||
char name[FILENAME_MAX];
|
||||
/** Mount point of the controller. */
|
||||
char path[FILENAME_MAX];
|
||||
};
|
||||
|
||||
/**
|
||||
* Read the mount table to give a list where each controller is
|
||||
* mounted.
|
||||
* @param handle Handle to be used for iteration.
|
||||
* @param info The variable where the path to the controller is stored.
|
||||
* @return #ECGEOF when no controllers are mounted.
|
||||
*/
|
||||
int cgroup_get_controller_begin(void **handle, struct cgroup_mount_point *info);
|
||||
|
||||
/**
|
||||
* Read the next mounted controller.
|
||||
* While walking through the mount table, the controllers are
|
||||
* returned in order of their mount points, i.e. controllers mounted together
|
||||
* in one hierarchy are returned next to each other.
|
||||
* @param handle Handle to be used for iteration.
|
||||
* @param info The variable where the path to the controller is stored.
|
||||
* @return #ECGEOF when all controllers were already returned.
|
||||
*/
|
||||
int cgroup_get_controller_next(void **handle, struct cgroup_mount_point *info);
|
||||
|
||||
/**
|
||||
* Release the iterator.
|
||||
*/
|
||||
int cgroup_get_controller_end(void **handle);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*
|
||||
* @name List all controllers
|
||||
* Use following functions to list all controllers, including those which are
|
||||
* not mounted. The controllers are returned in the same order as in
|
||||
* /proc/cgroups file, i.e. mostly random.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Detailed information about available controller.
|
||||
*/
|
||||
struct controller_data {
|
||||
/** Controller name. */
|
||||
char name[FILENAME_MAX];
|
||||
/**
|
||||
* Hierarchy ID. Controllers with the same hierarchy ID
|
||||
* are mounted together as one hierarchy. Controllers with
|
||||
* ID 0 are not currently mounted anywhere.
|
||||
*/
|
||||
int hierarchy;
|
||||
/** Number of groups. */
|
||||
int num_cgroups;
|
||||
/** Enabled flag. */
|
||||
int enabled;
|
||||
};
|
||||
|
||||
/**
|
||||
* Read the first of controllers from /proc/cgroups.
|
||||
* @param handle Handle to be used for iteration.
|
||||
* @param info The structure which will be filled with controller data.
|
||||
*/
|
||||
int cgroup_get_all_controller_begin(void **handle,
|
||||
struct controller_data *info);
|
||||
/**
|
||||
* Read next controllers from /proc/cgroups.
|
||||
* @param handle Handle to be used for iteration.
|
||||
* @param info The structure which will be filled with controller data.
|
||||
*/
|
||||
int cgroup_get_all_controller_next(void **handle, struct controller_data *info);
|
||||
|
||||
/**
|
||||
* Release the iterator
|
||||
*/
|
||||
int cgroup_get_all_controller_end(void **handle);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*
|
||||
* @name List all mount points of a controller.
|
||||
* Use following functions to list all mount points of a hierarchy with given
|
||||
* controller.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Read the first mount point of the hierarchy with given controller.
|
||||
* The first is the same as the mount point returned by
|
||||
* cgroup_get_subsys_mount_point().
|
||||
* @param handle Handle to be used for iteration.
|
||||
* @param controller Controller name.
|
||||
* @param path Buffer to fill the path into. The buffer must be at least
|
||||
* FILENAME_MAX characters long.
|
||||
*/
|
||||
int cgroup_get_subsys_mount_point_begin(const char *controller, void **handle,
|
||||
char *path);
|
||||
/**
|
||||
* Read next mount point of the hierarchy with given controller.
|
||||
* @param handle Handle to be used for iteration.
|
||||
* @param path Buffer to fill the path into. The buffer must be at least
|
||||
* FILENAME_MAX characters long.
|
||||
*/
|
||||
int cgroup_get_subsys_mount_point_next(void **handle,
|
||||
char *path);
|
||||
|
||||
/**
|
||||
* Release the iterator.
|
||||
*/
|
||||
int cgroup_get_subsys_mount_point_end(void **handle);
|
||||
|
||||
/**
|
||||
* @}
|
||||
* @}
|
||||
*/
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* _LIBCGROUP_ITERATORS_H */
|
147
libcgroup-0.41/include/libcgroup/log.h
Normal file
147
libcgroup-0.41/include/libcgroup/log.h
Normal file
@ -0,0 +1,147 @@
|
||||
#ifndef _LIBCGROUP_LOG_H
|
||||
#define _LIBCGROUP_LOG_H
|
||||
|
||||
#ifndef _LIBCGROUP_H_INSIDE
|
||||
#error "Only <libcgroup.h> should be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef SWIG
|
||||
#include <features.h>
|
||||
#endif
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
/**
|
||||
* @defgroup group_log 7. Logging
|
||||
* @{
|
||||
*
|
||||
* @name Logging
|
||||
* @{
|
||||
* Libcgroup allows applications to register a callback function which
|
||||
* libcgroup will call when it wants to log something. Each log message
|
||||
* has associated a log level. As described in previous chapter, most libcgroup
|
||||
* functions return an error code, which described root cause of the failure
|
||||
* and log messages might provide further details about these failures and other
|
||||
* notable events.
|
||||
*
|
||||
* @par
|
||||
* The logging callback can be set at any time, but setting the callback before
|
||||
* any other libcgroup function (including cgroup_init()) is highly recommended.
|
||||
* If no logger is set before cgroup_init() is called, default logger is
|
||||
* automatically set, logging CGROUP_LOG_ERROR messages to stdout.
|
||||
*
|
||||
* @par Setting log level
|
||||
* Some of the functions below set the log level as integer.
|
||||
* Application can set directly a value of enum #cgroup_log_level or use
|
||||
* value <tt>-1</tt> to set the log level automatically. In this case, libcgroup
|
||||
* inspects environment variable <tt>CGROUP_LOGLEVEL</tt> if it is set
|
||||
* and contains any of these values: <tt>ERROR</tt>, <tt>WARNING</tt>,
|
||||
* <tt>INFO</tt>, <tt>DEBUG</tt> or integer number representing value from
|
||||
* enum #cgroup_log_level. If <tt>CGROUP_LOGLEVEL</tt> is not set or its value
|
||||
* is not valid, <tt>CGROUP_LOG_ERROR</tt> is set as default log level.
|
||||
*
|
||||
* @par Example:
|
||||
* Following short example shows custom libcgroup logger sending all log
|
||||
* messages to <tt>stderr</tt>:
|
||||
* @code
|
||||
* static void my_logger(void *userdata, int level, const char *fmt, va_list ap)
|
||||
* {
|
||||
* vfprintf(stderr, fmt, ap);
|
||||
* }
|
||||
*
|
||||
* int main(int argc, char **argv)
|
||||
* {
|
||||
* int ret;
|
||||
*
|
||||
* cgroup_set_logger(my_logger, -1, NULL);
|
||||
* ret = cgroup_init();
|
||||
* if (ret) {
|
||||
* ...
|
||||
* }
|
||||
* ...
|
||||
* @endcode
|
||||
*/
|
||||
|
||||
/**
|
||||
* Level of importance of a log message.
|
||||
*/
|
||||
enum cgroup_log_level {
|
||||
/**
|
||||
* Something serious happened and libcgroup failed to perform requested
|
||||
* operation.
|
||||
*/
|
||||
CGROUP_LOG_ERROR = 1,
|
||||
/**
|
||||
* Something bad happened but libcgroup recovered from the error.
|
||||
*/
|
||||
CGROUP_LOG_WARNING,
|
||||
/**
|
||||
* Something interesting happened and the message might be useful to the
|
||||
* user.
|
||||
*/
|
||||
CGROUP_LOG_INFO,
|
||||
/**
|
||||
* Debugging messages useful to libcgroup developers.
|
||||
*/
|
||||
CGROUP_LOG_DEBUG,
|
||||
};
|
||||
|
||||
typedef void (*cgroup_logger_callback)(void *userdata, int level,
|
||||
const char *fmt, va_list ap);
|
||||
|
||||
/**
|
||||
* Set libcgroup logging callback. All log messages with equal or lower log
|
||||
* level will be sent to the application's callback. There can be only
|
||||
* one callback logger set, the previous callback is replaced with the new one
|
||||
* by calling this function.
|
||||
* Use NULL as the logger callback to completely disable libcgroup logging.
|
||||
*
|
||||
* @param logger The callback.
|
||||
* @param loglevel The log level. Use value -1 to automatically discover the
|
||||
* level from CGROUP_LOGLEVEL environment variable.
|
||||
* @param userdata Application's data which will be provided back to the
|
||||
* callback.
|
||||
*/
|
||||
extern void cgroup_set_logger(cgroup_logger_callback logger, int loglevel,
|
||||
void *userdata);
|
||||
|
||||
/**
|
||||
* Set libcgroup logging to stdout. All messages with the given loglevel
|
||||
* or below will be sent to standard output. Previous logger set by
|
||||
* cgroup_set_logger() is replaced.
|
||||
*
|
||||
* @param loglevel The log level. Use value -1 to automatically discover the
|
||||
* level from CGROUP_LOGLEVEL environment variable.
|
||||
*/
|
||||
extern void cgroup_set_default_logger(int loglevel);
|
||||
|
||||
/**
|
||||
* Change current loglevel.
|
||||
* @param loglevel The log level. Use value -1 to automatically discover the
|
||||
* level from CGROUP_LOGLEVEL environment variable.
|
||||
*/
|
||||
extern void cgroup_set_loglevel(int loglevel);
|
||||
|
||||
/**
|
||||
* Libcgroup log function. This is for applications which are too lazy to set
|
||||
* up their own complex logging and miss-use libcgroup for that purpose.
|
||||
* I.e. this function should be used only by simple command-line tools.
|
||||
* This logging automatically benefits from CGROUP_LOGLEVEL env. variable.
|
||||
*/
|
||||
extern void cgroup_log(int loglevel, const char *fmt, ...);
|
||||
|
||||
/**
|
||||
* Parse levelstr string for information about desired loglevel. The levelstr
|
||||
* is usually a value of the CGROUP_LOGLEVEL environment variable.
|
||||
* @param levelstr String containing desired loglevel.
|
||||
*/
|
||||
extern int cgroup_parse_log_level_str(const char *levelstr);
|
||||
/**
|
||||
* @}
|
||||
* @}
|
||||
*/
|
||||
__END_DECLS
|
||||
|
||||
#endif /* _LIBCGROUP_LOG_H */
|
209
libcgroup-0.41/include/libcgroup/tasks.h
Normal file
209
libcgroup-0.41/include/libcgroup/tasks.h
Normal file
@ -0,0 +1,209 @@
|
||||
#ifndef _LIBCGROUP_TASKS_H
|
||||
#define _LIBCGROUP_TASKS_H
|
||||
|
||||
#ifndef _LIBCGROUP_H_INSIDE
|
||||
#error "Only <libcgroup.h> should be included directly."
|
||||
#endif
|
||||
|
||||
#include <libcgroup/groups.h>
|
||||
|
||||
#ifndef SWIG
|
||||
#include <features.h>
|
||||
#include <stdbool.h>
|
||||
#endif
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
/** Flags for cgroup_change_cgroup_uid_gid(). */
|
||||
enum cgflags {
|
||||
/** Use cached rules, do not read rules from disk. */
|
||||
CGFLAG_USECACHE = 0x01,
|
||||
/** Use cached templates, do not read templates from disk. */
|
||||
CGFLAG_USE_TEMPLATE_CACHE = 0x02,
|
||||
};
|
||||
|
||||
/** Flags for cgroup_register_unchanged_process(). */
|
||||
enum cgroup_daemon_type {
|
||||
/**
|
||||
* The daemon must not touch the given task, i.e. it never moves it
|
||||
* to any controlgroup.
|
||||
*/
|
||||
CGROUP_DAEMON_UNCHANGE_CHILDREN = 0x1,
|
||||
CGROUP_DAEMON_CANCEL_UNCHANGE_PROCESS = 0x2,
|
||||
};
|
||||
|
||||
/**
|
||||
* @defgroup group_tasks 4. Manipulation with tasks
|
||||
* @{
|
||||
*
|
||||
* @name Simple task assignment
|
||||
* @{
|
||||
* Applications can use following functions to simply put a task into given
|
||||
* control group and find a groups where given tasks is.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Move current task (=thread) to given control group.
|
||||
* @param cgroup Destination control group.
|
||||
*/
|
||||
int cgroup_attach_task(struct cgroup *cgroup);
|
||||
|
||||
/**
|
||||
* Move given task (=thread) to to given control group.
|
||||
* @param cgroup Destination control group.
|
||||
* @param tid The task to move.
|
||||
*/
|
||||
int cgroup_attach_task_pid(struct cgroup *cgroup, pid_t tid);
|
||||
|
||||
/**
|
||||
* Changes the cgroup of a task based on the path provided. In this case,
|
||||
* the user must already know into which cgroup the task should be placed and
|
||||
* no rules will be parsed.
|
||||
*
|
||||
* @param path Name of the destination group.
|
||||
* @param pid The task to move.
|
||||
* @param controllers List of controllers.
|
||||
*
|
||||
* @todo should this function be really public?
|
||||
*/
|
||||
int cgroup_change_cgroup_path(const char *path, pid_t pid,
|
||||
const char * const controllers[]);
|
||||
|
||||
/**
|
||||
* Get the current control group path where the given task is.
|
||||
* @param pid The task to find.
|
||||
* @param controller The controller (hierarchy), where to find the task.
|
||||
* @param current_path The path to control group, where the task has been found.
|
||||
* The patch is relative to the root of the hierarchy. The caller must
|
||||
* free this memory.
|
||||
*/
|
||||
int cgroup_get_current_controller_path(pid_t pid, const char *controller,
|
||||
char **current_path);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*
|
||||
* @name Rules
|
||||
* @{
|
||||
* @c libcgroup can move tasks to control groups using simple rules, loaded
|
||||
* from configuration file. See cgrules.conf man page to see format of the file.
|
||||
* Following functions can be used to load these rules from a file.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Initializes the rules cache and load it from /etc/cgrules.conf.
|
||||
* @todo add parameter with the filename?
|
||||
*/
|
||||
int cgroup_init_rules_cache(void);
|
||||
|
||||
/**
|
||||
* Reloads the rules list from /etc/cgrules.conf. This function
|
||||
* is probably NOT thread safe (calls cgroup_parse_rules_config()).
|
||||
*/
|
||||
int cgroup_reload_cached_rules(void);
|
||||
|
||||
/**
|
||||
* Print the cached rules table. This function should be called only after
|
||||
* first calling cgroup_parse_config(), but it will work with an empty rule
|
||||
* list.
|
||||
* @param fp Destination file, where the rules will be printed.
|
||||
*/
|
||||
void cgroup_print_rules_config(FILE *fp);
|
||||
|
||||
/**
|
||||
* @}
|
||||
* @name Rule based task assignment
|
||||
* @{
|
||||
* @c libcgroup can move tasks to control groups using simple rules, loaded
|
||||
* from configuration file. See cgrules.conf man page to see format of the file.
|
||||
* Applications can move tasks to control groups based on these rules using
|
||||
* following functions.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Changes the cgroup of all running PIDs based on the rules in the config
|
||||
* file. If a rules exists for a PID, then the PID is placed in the correct
|
||||
* group.
|
||||
*
|
||||
* This function may be called after creating new control groups to move
|
||||
* running PIDs into the newly created control groups.
|
||||
* @return 0 on success, < 0 on error
|
||||
*/
|
||||
int cgroup_change_all_cgroups(void);
|
||||
|
||||
/**
|
||||
* Changes the cgroup of a program based on the rules in the config file.
|
||||
* If a rule exists for the given UID, GID or PROCESS NAME, then the given
|
||||
* PID is placed into the correct group. By default, this function parses
|
||||
* the configuration file each time it is called.
|
||||
*
|
||||
* The flags can alter the behavior of this function:
|
||||
* CGFLAG_USECACHE: Use cached rules instead of parsing the config file
|
||||
* CGFLAG_USE_TEMPLATE_CACHE: Use cached templates instead of
|
||||
* parsing the config file
|
||||
*
|
||||
* This function may NOT be thread safe.
|
||||
* @param uid The UID to match.
|
||||
* @param gid The GID to match.
|
||||
* @param procname The PROCESS NAME to match.
|
||||
* @param pid The PID of the process to move.
|
||||
* @param flags Bit flags to change the behavior, as defined in enum #cgflags.
|
||||
* @todo Determine thread-safeness and fix of not safe.
|
||||
*/
|
||||
int cgroup_change_cgroup_flags(uid_t uid, gid_t gid,
|
||||
const char *procname, pid_t pid, int flags);
|
||||
|
||||
/**
|
||||
* Changes the cgroup of a program based on the rules in the config file. If a
|
||||
* rule exists for the given UID or GID, then the given PID is placed into the
|
||||
* correct group. By default, this function parses the configuration file each
|
||||
* time it is called.
|
||||
*
|
||||
* This function may NOT be thread safe.
|
||||
* @param uid The UID to match.
|
||||
* @param gid The GID to match.
|
||||
* @param pid The PID of the process to move.
|
||||
* @param flags Bit flags to change the behavior, as defined in enum #cgflags.
|
||||
* @todo Determine thread-safeness and fix if not safe.
|
||||
*/
|
||||
int cgroup_change_cgroup_uid_gid_flags(uid_t uid, gid_t gid,
|
||||
pid_t pid, int flags);
|
||||
|
||||
/**
|
||||
* Provides backwards-compatibility with older versions of the API. This
|
||||
* function is deprecated, and cgroup_change_cgroup_uid_gid_flags() should be
|
||||
* used instead. In fact, this function simply calls the newer one with flags
|
||||
* set to 0 (none).
|
||||
* @param uid The UID to match.
|
||||
* @param gid The GID to match.
|
||||
* @param pid The PID of the process to move.
|
||||
*/
|
||||
int cgroup_change_cgroup_uid_gid(uid_t uid, gid_t gid, pid_t pid);
|
||||
|
||||
/**
|
||||
* @}
|
||||
* @name Communication with cgrulesengd daemon
|
||||
* @{
|
||||
* Users can use cgrulesengd daemon to move tasks to groups based on the rules
|
||||
* automatically when they change their UID, GID or executable name.
|
||||
* The daemon allows tasks to be 'sticky', i.e. all rules are ignored for these
|
||||
* tasks and the daemon never moves them.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Register the unchanged process to a cgrulesengd daemon. This process
|
||||
* is never moved to another control group by the daemon.
|
||||
* If the daemon does not work, this function returns 0 as success.
|
||||
* @param pid The task id.
|
||||
* @param flags Bit flags to change the behavior, as defined in
|
||||
* #cgroup_daemon_type
|
||||
*/
|
||||
int cgroup_register_unchanged_process(pid_t pid, int flags);
|
||||
|
||||
/**
|
||||
* @}
|
||||
* @}
|
||||
*/
|
||||
__END_DECLS
|
||||
|
||||
#endif /* _LIBCGROUP_TASKS_H */
|
527
libcgroup-0.41/install-sh
Executable file
527
libcgroup-0.41/install-sh
Executable file
@ -0,0 +1,527 @@
|
||||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
|
||||
scriptversion=2011-11-20.07; # UTC
|
||||
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
# following copyright and license.
|
||||
#
|
||||
# Copyright (C) 1994 X Consortium
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
# deal in the Software without restriction, including without limitation the
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
# sell copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
|
||||
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the X Consortium shall not
|
||||
# be used in advertising or otherwise to promote the sale, use or other deal-
|
||||
# ings in this Software without prior written authorization from the X Consor-
|
||||
# tium.
|
||||
#
|
||||
#
|
||||
# FSF changes to this file are in the public domain.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# 'make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch.
|
||||
|
||||
nl='
|
||||
'
|
||||
IFS=" "" $nl"
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit=${DOITPROG-}
|
||||
if test -z "$doit"; then
|
||||
doit_exec=exec
|
||||
else
|
||||
doit_exec=$doit
|
||||
fi
|
||||
|
||||
# Put in absolute file names if you don't have them in your path;
|
||||
# or use environment vars.
|
||||
|
||||
chgrpprog=${CHGRPPROG-chgrp}
|
||||
chmodprog=${CHMODPROG-chmod}
|
||||
chownprog=${CHOWNPROG-chown}
|
||||
cmpprog=${CMPPROG-cmp}
|
||||
cpprog=${CPPROG-cp}
|
||||
mkdirprog=${MKDIRPROG-mkdir}
|
||||
mvprog=${MVPROG-mv}
|
||||
rmprog=${RMPROG-rm}
|
||||
stripprog=${STRIPPROG-strip}
|
||||
|
||||
posix_glob='?'
|
||||
initialize_posix_glob='
|
||||
test "$posix_glob" != "?" || {
|
||||
if (set -f) 2>/dev/null; then
|
||||
posix_glob=
|
||||
else
|
||||
posix_glob=:
|
||||
fi
|
||||
}
|
||||
'
|
||||
|
||||
posix_mkdir=
|
||||
|
||||
# Desired mode of installed file.
|
||||
mode=0755
|
||||
|
||||
chgrpcmd=
|
||||
chmodcmd=$chmodprog
|
||||
chowncmd=
|
||||
mvcmd=$mvprog
|
||||
rmcmd="$rmprog -f"
|
||||
stripcmd=
|
||||
|
||||
src=
|
||||
dst=
|
||||
dir_arg=
|
||||
dst_arg=
|
||||
|
||||
copy_on_change=false
|
||||
no_target_directory=
|
||||
|
||||
usage="\
|
||||
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
||||
or: $0 [OPTION]... SRCFILES... DIRECTORY
|
||||
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
|
||||
or: $0 [OPTION]... -d DIRECTORIES...
|
||||
|
||||
In the 1st form, copy SRCFILE to DSTFILE.
|
||||
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
|
||||
In the 4th, create DIRECTORIES.
|
||||
|
||||
Options:
|
||||
--help display this help and exit.
|
||||
--version display version info and exit.
|
||||
|
||||
-c (ignored)
|
||||
-C install only if different (preserve the last data modification time)
|
||||
-d create directories instead of installing files.
|
||||
-g GROUP $chgrpprog installed files to GROUP.
|
||||
-m MODE $chmodprog installed files to MODE.
|
||||
-o USER $chownprog installed files to USER.
|
||||
-s $stripprog installed files.
|
||||
-t DIRECTORY install into DIRECTORY.
|
||||
-T report an error if DSTFILE is a directory.
|
||||
|
||||
Environment variables override the default commands:
|
||||
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
|
||||
RMPROG STRIPPROG
|
||||
"
|
||||
|
||||
while test $# -ne 0; do
|
||||
case $1 in
|
||||
-c) ;;
|
||||
|
||||
-C) copy_on_change=true;;
|
||||
|
||||
-d) dir_arg=true;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift;;
|
||||
|
||||
--help) echo "$usage"; exit $?;;
|
||||
|
||||
-m) mode=$2
|
||||
case $mode in
|
||||
*' '* | *' '* | *'
|
||||
'* | *'*'* | *'?'* | *'['*)
|
||||
echo "$0: invalid mode: $mode" >&2
|
||||
exit 1;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift;;
|
||||
|
||||
-s) stripcmd=$stripprog;;
|
||||
|
||||
-t) dst_arg=$2
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-T) no_target_directory=true;;
|
||||
|
||||
--version) echo "$0 $scriptversion"; exit $?;;
|
||||
|
||||
--) shift
|
||||
break;;
|
||||
|
||||
-*) echo "$0: invalid option: $1" >&2
|
||||
exit 1;;
|
||||
|
||||
*) break;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
|
||||
# When -d is used, all remaining arguments are directories to create.
|
||||
# When -t is used, the destination is already specified.
|
||||
# Otherwise, the last argument is the destination. Remove it from $@.
|
||||
for arg
|
||||
do
|
||||
if test -n "$dst_arg"; then
|
||||
# $@ is not empty: it contains at least $arg.
|
||||
set fnord "$@" "$dst_arg"
|
||||
shift # fnord
|
||||
fi
|
||||
shift # arg
|
||||
dst_arg=$arg
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
|
||||
if test $# -eq 0; then
|
||||
if test -z "$dir_arg"; then
|
||||
echo "$0: no input file specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
# It's OK to call 'install-sh -d' without argument.
|
||||
# This can happen when creating conditional directories.
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if test -z "$dir_arg"; then
|
||||
do_exit='(exit $ret); exit $ret'
|
||||
trap "ret=129; $do_exit" 1
|
||||
trap "ret=130; $do_exit" 2
|
||||
trap "ret=141; $do_exit" 13
|
||||
trap "ret=143; $do_exit" 15
|
||||
|
||||
# Set umask so as not to create temps with too-generous modes.
|
||||
# However, 'strip' requires both read and write access to temps.
|
||||
case $mode in
|
||||
# Optimize common cases.
|
||||
*644) cp_umask=133;;
|
||||
*755) cp_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw='% 200'
|
||||
fi
|
||||
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
|
||||
*)
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw=,u+rw
|
||||
fi
|
||||
cp_umask=$mode$u_plus_rw;;
|
||||
esac
|
||||
fi
|
||||
|
||||
for src
|
||||
do
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $src in
|
||||
-* | [=\(\)!]) src=./$src;;
|
||||
esac
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
dst=$src
|
||||
dstdir=$dst
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
if test ! -f "$src" && test ! -d "$src"; then
|
||||
echo "$0: $src does not exist." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -z "$dst_arg"; then
|
||||
echo "$0: no destination specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
dst=$dst_arg
|
||||
|
||||
# If destination is a directory, append the input filename; won't work
|
||||
# if double slashes aren't ignored.
|
||||
if test -d "$dst"; then
|
||||
if test -n "$no_target_directory"; then
|
||||
echo "$0: $dst_arg: Is a directory" >&2
|
||||
exit 1
|
||||
fi
|
||||
dstdir=$dst
|
||||
dst=$dstdir/`basename "$src"`
|
||||
dstdir_status=0
|
||||
else
|
||||
# Prefer dirname, but fall back on a substitute if dirname fails.
|
||||
dstdir=`
|
||||
(dirname "$dst") 2>/dev/null ||
|
||||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
||||
X"$dst" : 'X\(//\)[^/]' \| \
|
||||
X"$dst" : 'X\(//\)$' \| \
|
||||
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
|
||||
echo X"$dst" |
|
||||
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)[^/].*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\).*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
s/.*/./; q'
|
||||
`
|
||||
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
fi
|
||||
fi
|
||||
|
||||
obsolete_mkdir_used=false
|
||||
|
||||
if test $dstdir_status != 0; then
|
||||
case $posix_mkdir in
|
||||
'')
|
||||
# Create intermediate dirs using mode 755 as modified by the umask.
|
||||
# This is like FreeBSD 'install' as of 1997-10-28.
|
||||
umask=`umask`
|
||||
case $stripcmd.$umask in
|
||||
# Optimize common cases.
|
||||
*[2367][2367]) mkdir_umask=$umask;;
|
||||
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
mkdir_umask=`expr $umask + 22 \
|
||||
- $umask % 100 % 40 + $umask % 20 \
|
||||
- $umask % 10 % 4 + $umask % 2
|
||||
`;;
|
||||
*) mkdir_umask=$umask,go-w;;
|
||||
esac
|
||||
|
||||
# With -d, create the new directory with the user-specified mode.
|
||||
# Otherwise, rely on $mkdir_umask.
|
||||
if test -n "$dir_arg"; then
|
||||
mkdir_mode=-m$mode
|
||||
else
|
||||
mkdir_mode=
|
||||
fi
|
||||
|
||||
posix_mkdir=false
|
||||
case $umask in
|
||||
*[123567][0-7][0-7])
|
||||
# POSIX mkdir -p sets u+wx bits regardless of umask, which
|
||||
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
||||
;;
|
||||
*)
|
||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
|
||||
|
||||
if (umask $mkdir_umask &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
|
||||
then
|
||||
if test -z "$dir_arg" || {
|
||||
# Check for POSIX incompatibilities with -m.
|
||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||
# other-writable bit of parent directory when it shouldn't.
|
||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||
ls_ld_tmpdir=`ls -ld "$tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
d????-?r-*) different_mode=700;;
|
||||
d????-?--*) different_mode=755;;
|
||||
*) false;;
|
||||
esac &&
|
||||
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
|
||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||
}
|
||||
}
|
||||
then posix_mkdir=:
|
||||
fi
|
||||
rmdir "$tmpdir/d" "$tmpdir"
|
||||
else
|
||||
# Remove any dirs left behind by ancient mkdir implementations.
|
||||
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
|
||||
fi
|
||||
trap '' 0;;
|
||||
esac;;
|
||||
esac
|
||||
|
||||
if
|
||||
$posix_mkdir && (
|
||||
umask $mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
|
||||
)
|
||||
then :
|
||||
else
|
||||
|
||||
# The umask is ridiculous, or mkdir does not conform to POSIX,
|
||||
# or it failed possibly due to a race condition. Create the
|
||||
# directory the slow way, step by step, checking for races as we go.
|
||||
|
||||
case $dstdir in
|
||||
/*) prefix='/';;
|
||||
[-=\(\)!]*) prefix='./';;
|
||||
*) prefix='';;
|
||||
esac
|
||||
|
||||
eval "$initialize_posix_glob"
|
||||
|
||||
oIFS=$IFS
|
||||
IFS=/
|
||||
$posix_glob set -f
|
||||
set fnord $dstdir
|
||||
shift
|
||||
$posix_glob set +f
|
||||
IFS=$oIFS
|
||||
|
||||
prefixes=
|
||||
|
||||
for d
|
||||
do
|
||||
test X"$d" = X && continue
|
||||
|
||||
prefix=$prefix$d
|
||||
if test -d "$prefix"; then
|
||||
prefixes=
|
||||
else
|
||||
if $posix_mkdir; then
|
||||
(umask=$mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
||||
# Don't fail if two instances are running concurrently.
|
||||
test -d "$prefix" || exit 1
|
||||
else
|
||||
case $prefix in
|
||||
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
|
||||
*) qprefix=$prefix;;
|
||||
esac
|
||||
prefixes="$prefixes '$qprefix'"
|
||||
fi
|
||||
fi
|
||||
prefix=$prefix/
|
||||
done
|
||||
|
||||
if test -n "$prefixes"; then
|
||||
# Don't fail if two instances are running concurrently.
|
||||
(umask $mkdir_umask &&
|
||||
eval "\$doit_exec \$mkdirprog $prefixes") ||
|
||||
test -d "$dstdir" || exit 1
|
||||
obsolete_mkdir_used=true
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
|
||||
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
|
||||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
|
||||
else
|
||||
|
||||
# Make a couple of temp file names in the proper directory.
|
||||
dsttmp=$dstdir/_inst.$$_
|
||||
rmtmp=$dstdir/_rm.$$_
|
||||
|
||||
# Trap to clean up those temp files at exit.
|
||||
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
||||
|
||||
# Copy the file name to the temp name.
|
||||
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits.
|
||||
#
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $cpprog $src $dsttmp" command.
|
||||
#
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
|
||||
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
|
||||
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
|
||||
|
||||
# If -C, don't bother to copy if it wouldn't change the file.
|
||||
if $copy_on_change &&
|
||||
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
|
||||
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
|
||||
|
||||
eval "$initialize_posix_glob" &&
|
||||
$posix_glob set -f &&
|
||||
set X $old && old=:$2:$4:$5:$6 &&
|
||||
set X $new && new=:$2:$4:$5:$6 &&
|
||||
$posix_glob set +f &&
|
||||
|
||||
test "$old" = "$new" &&
|
||||
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
|
||||
then
|
||||
rm -f "$dsttmp"
|
||||
else
|
||||
# Rename the file to the real destination.
|
||||
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
|
||||
|
||||
# The rename failed, perhaps because mv can't rename something else
|
||||
# to itself, or perhaps because mv is so ancient that it does not
|
||||
# support -f.
|
||||
{
|
||||
# Now remove or move aside any old file at destination location.
|
||||
# We try this two ways since rm can't unlink itself on some
|
||||
# systems and the destination file might be busy for other
|
||||
# reasons. In this case, the final cleanup might fail but the new
|
||||
# file should still install successfully.
|
||||
{
|
||||
test ! -f "$dst" ||
|
||||
$doit $rmcmd -f "$dst" 2>/dev/null ||
|
||||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
||||
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
|
||||
} ||
|
||||
{ echo "$0: cannot unlink or rename $dst" >&2
|
||||
(exit 1); exit 1
|
||||
}
|
||||
} &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
$doit $mvcmd "$dsttmp" "$dst"
|
||||
}
|
||||
fi || exit 1
|
||||
|
||||
trap '' 0
|
||||
fi
|
||||
done
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
1519
libcgroup-0.41/libcgroup.doxyfile
Normal file
1519
libcgroup-0.41/libcgroup.doxyfile
Normal file
File diff suppressed because it is too large
Load Diff
10
libcgroup-0.41/libcgroup.pc.in
Normal file
10
libcgroup-0.41/libcgroup.pc.in
Normal file
@ -0,0 +1,10 @@
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
|
||||
Name: libcgroup
|
||||
Description: Control Group Configuration Library
|
||||
Version: @PACKAGE_VERSION@
|
||||
Libs: -L${libdir} -lcgroup
|
||||
Cflags: -I${includedir}
|
9655
libcgroup-0.41/ltmain.sh
Normal file
9655
libcgroup-0.41/ltmain.sh
Normal file
File diff suppressed because it is too large
Load Diff
215
libcgroup-0.41/missing
Executable file
215
libcgroup-0.41/missing
Executable file
@ -0,0 +1,215 @@
|
||||
#! /bin/sh
|
||||
# Common wrapper for a few potentially missing GNU programs.
|
||||
|
||||
scriptversion=2012-06-26.16; # UTC
|
||||
|
||||
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
|
||||
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo 1>&2 "Try '$0 --help' for more information"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case $1 in
|
||||
|
||||
--is-lightweight)
|
||||
# Used by our autoconf macros to check whether the available missing
|
||||
# script is modern enough.
|
||||
exit 0
|
||||
;;
|
||||
|
||||
--run)
|
||||
# Back-compat with the calling convention used by older automake.
|
||||
shift
|
||||
;;
|
||||
|
||||
-h|--h|--he|--hel|--help)
|
||||
echo "\
|
||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||
|
||||
Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
|
||||
to PROGRAM being missing or too old.
|
||||
|
||||
Options:
|
||||
-h, --help display this help and exit
|
||||
-v, --version output version information and exit
|
||||
|
||||
Supported PROGRAM values:
|
||||
aclocal autoconf autoheader autom4te automake makeinfo
|
||||
bison yacc flex lex help2man
|
||||
|
||||
Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
|
||||
'g' are ignored when checking the name.
|
||||
|
||||
Send bug reports to <bug-automake@gnu.org>."
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||
echo "missing $scriptversion (GNU Automake)"
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-*)
|
||||
echo 1>&2 "$0: unknown '$1' option"
|
||||
echo 1>&2 "Try '$0 --help' for more information"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
# Run the given program, remember its exit status.
|
||||
"$@"; st=$?
|
||||
|
||||
# If it succeeded, we are done.
|
||||
test $st -eq 0 && exit 0
|
||||
|
||||
# Also exit now if we it failed (or wasn't found), and '--version' was
|
||||
# passed; such an option is passed most likely to detect whether the
|
||||
# program is present and works.
|
||||
case $2 in --version|--help) exit $st;; esac
|
||||
|
||||
# Exit code 63 means version mismatch. This often happens when the user
|
||||
# tries to use an ancient version of a tool on a file that requires a
|
||||
# minimum version.
|
||||
if test $st -eq 63; then
|
||||
msg="probably too old"
|
||||
elif test $st -eq 127; then
|
||||
# Program was missing.
|
||||
msg="missing on your system"
|
||||
else
|
||||
# Program was found and executed, but failed. Give up.
|
||||
exit $st
|
||||
fi
|
||||
|
||||
perl_URL=http://www.perl.org/
|
||||
flex_URL=http://flex.sourceforge.net/
|
||||
gnu_software_URL=http://www.gnu.org/software
|
||||
|
||||
program_details ()
|
||||
{
|
||||
case $1 in
|
||||
aclocal|automake)
|
||||
echo "The '$1' program is part of the GNU Automake package:"
|
||||
echo "<$gnu_software_URL/automake>"
|
||||
echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
|
||||
echo "<$gnu_software_URL/autoconf>"
|
||||
echo "<$gnu_software_URL/m4/>"
|
||||
echo "<$perl_URL>"
|
||||
;;
|
||||
autoconf|autom4te|autoheader)
|
||||
echo "The '$1' program is part of the GNU Autoconf package:"
|
||||
echo "<$gnu_software_URL/autoconf/>"
|
||||
echo "It also requires GNU m4 and Perl in order to run:"
|
||||
echo "<$gnu_software_URL/m4/>"
|
||||
echo "<$perl_URL>"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
give_advice ()
|
||||
{
|
||||
# Normalize program name to check for.
|
||||
normalized_program=`echo "$1" | sed '
|
||||
s/^gnu-//; t
|
||||
s/^gnu//; t
|
||||
s/^g//; t'`
|
||||
|
||||
printf '%s\n' "'$1' is $msg."
|
||||
|
||||
configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
|
||||
case $normalized_program in
|
||||
autoconf*)
|
||||
echo "You should only need it if you modified 'configure.ac',"
|
||||
echo "or m4 files included by it."
|
||||
program_details 'autoconf'
|
||||
;;
|
||||
autoheader*)
|
||||
echo "You should only need it if you modified 'acconfig.h' or"
|
||||
echo "$configure_deps."
|
||||
program_details 'autoheader'
|
||||
;;
|
||||
automake*)
|
||||
echo "You should only need it if you modified 'Makefile.am' or"
|
||||
echo "$configure_deps."
|
||||
program_details 'automake'
|
||||
;;
|
||||
aclocal*)
|
||||
echo "You should only need it if you modified 'acinclude.m4' or"
|
||||
echo "$configure_deps."
|
||||
program_details 'aclocal'
|
||||
;;
|
||||
autom4te*)
|
||||
echo "You might have modified some maintainer files that require"
|
||||
echo "the 'automa4te' program to be rebuilt."
|
||||
program_details 'autom4te'
|
||||
;;
|
||||
bison*|yacc*)
|
||||
echo "You should only need it if you modified a '.y' file."
|
||||
echo "You may want to install the GNU Bison package:"
|
||||
echo "<$gnu_software_URL/bison/>"
|
||||
;;
|
||||
lex*|flex*)
|
||||
echo "You should only need it if you modified a '.l' file."
|
||||
echo "You may want to install the Fast Lexical Analyzer package:"
|
||||
echo "<$flex_URL>"
|
||||
;;
|
||||
help2man*)
|
||||
echo "You should only need it if you modified a dependency" \
|
||||
"of a man page."
|
||||
echo "You may want to install the GNU Help2man package:"
|
||||
echo "<$gnu_software_URL/help2man/>"
|
||||
;;
|
||||
makeinfo*)
|
||||
echo "You should only need it if you modified a '.texi' file, or"
|
||||
echo "any other file indirectly affecting the aspect of the manual."
|
||||
echo "You might want to install the Texinfo package:"
|
||||
echo "<$gnu_software_URL/texinfo/>"
|
||||
echo "The spurious makeinfo call might also be the consequence of"
|
||||
echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
|
||||
echo "want to install GNU make:"
|
||||
echo "<$gnu_software_URL/make/>"
|
||||
;;
|
||||
*)
|
||||
echo "You might have modified some files without having the proper"
|
||||
echo "tools for further handling them. Check the 'README' file, it"
|
||||
echo "often tells you about the needed prerequisites for installing"
|
||||
echo "this package. You may also peek at any GNU archive site, in"
|
||||
echo "case some other package contains this missing '$1' program."
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
give_advice "$1" | sed -e '1s/^/WARNING: /' \
|
||||
-e '2,$s/^/ /' >&2
|
||||
|
||||
# Propagate the correct exit status (expected to be 127 for a program
|
||||
# not found, 63 for a program that failed due to version mismatch).
|
||||
exit $st
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
2
libcgroup-0.41/samples/Makefile.am
Normal file
2
libcgroup-0.41/samples/Makefile.am
Normal file
@ -0,0 +1,2 @@
|
||||
EXTRA_DIST = cgconfig.conf cgred.conf cgrules.conf cgconfig.sysconfig \
|
||||
cgsnapshot_blacklist.conf
|
436
libcgroup-0.41/samples/Makefile.in
Normal file
436
libcgroup-0.41/samples/Makefile.in
Normal file
@ -0,0 +1,436 @@
|
||||
# Makefile.in generated by automake 1.13.4 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
VPATH = @srcdir@
|
||||
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = samples
|
||||
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
FGREP = @FGREP@
|
||||
GREP = @GREP@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LEX = @LEX@
|
||||
LEXLIB = @LEXLIB@
|
||||
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBRARY_VERSION_MAJOR = @LIBRARY_VERSION_MAJOR@
|
||||
LIBRARY_VERSION_MINOR = @LIBRARY_VERSION_MINOR@
|
||||
LIBRARY_VERSION_RELEASE = @LIBRARY_VERSION_RELEASE@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
REALLY_YACC = @REALLY_YACC@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
YACC = @YACC@
|
||||
YFLAGS = @YFLAGS@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pamlibdir = @pamlibdir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
EXTRA_DIST = cgconfig.conf cgred.conf cgrules.conf cgconfig.sysconfig \
|
||||
cgsnapshot_blacklist.conf
|
||||
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign samples/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign samples/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
tags TAGS:
|
||||
|
||||
ctags CTAGS:
|
||||
|
||||
cscope cscopelist:
|
||||
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile
|
||||
installdirs:
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am:
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
|
||||
cscopelist-am ctags-am distclean distclean-generic \
|
||||
distclean-libtool distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-dvi \
|
||||
install-dvi-am install-exec install-exec-am install-html \
|
||||
install-html-am install-info install-info-am install-man \
|
||||
install-pdf install-pdf-am install-ps install-ps-am \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
tags-am uninstall uninstall-am
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
17
libcgroup-0.41/samples/cgconfig.conf
Normal file
17
libcgroup-0.41/samples/cgconfig.conf
Normal file
@ -0,0 +1,17 @@
|
||||
#
|
||||
# Copyright IBM Corporation. 2007
|
||||
#
|
||||
# Authors: Balbir Singh <balbir@linux.vnet.ibm.com>
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of version 2.1 of the GNU Lesser General Public License
|
||||
# as published by the Free Software Foundation.
|
||||
#
|
||||
# This program is distributed in the hope that it would be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
#
|
||||
#
|
||||
# By default, we expect systemd mounts everything on boot,
|
||||
# so there is not much to do.
|
||||
# See man cgconfig.conf for further details, how to create groups
|
||||
# on system boot using this file.
|
48
libcgroup-0.41/samples/cgconfig.conf.config-patch
Normal file
48
libcgroup-0.41/samples/cgconfig.conf.config-patch
Normal file
@ -0,0 +1,48 @@
|
||||
#
|
||||
# Copyright IBM Corporation. 2007
|
||||
#
|
||||
# Authors: Balbir Singh <balbir@linux.vnet.ibm.com>
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of version 2.1 of the GNU Lesser General Public License
|
||||
# as published by the Free Software Foundation.
|
||||
#
|
||||
# This program is distributed in the hope that it would be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
#
|
||||
#group daemons/www {
|
||||
# perm {
|
||||
# task {
|
||||
# uid = root;
|
||||
# gid = webmaster;
|
||||
# }
|
||||
# admin {
|
||||
# uid = root;
|
||||
# gid = root;
|
||||
# }
|
||||
# }
|
||||
# cpu {
|
||||
# cpu.shares = 1000;
|
||||
# }
|
||||
#}
|
||||
#
|
||||
#group daemons/ftp {
|
||||
# perm {
|
||||
# task {
|
||||
# uid = root;
|
||||
# gid = ftpmaster;
|
||||
# }
|
||||
# admin {
|
||||
# uid = root;
|
||||
# gid = root;
|
||||
# }
|
||||
# }
|
||||
# cpu {
|
||||
# cpu.shares = 500;
|
||||
# }
|
||||
#}
|
||||
#
|
||||
#mount {
|
||||
# cpu = /mnt/cgroups/cpu;
|
||||
# cpuacct = /mnt/cgroups/cpuacct;
|
||||
#}
|
10
libcgroup-0.41/samples/cgconfig.sysconfig
Normal file
10
libcgroup-0.41/samples/cgconfig.sysconfig
Normal file
@ -0,0 +1,10 @@
|
||||
# Service cgconfig can create a default group in all mounted hierarchies and
|
||||
# move all processes there on boot. If no default rule is specified in
|
||||
# /etc/cgrules.conf, the default group is named '/sysdefault'.
|
||||
# This automatically created group(s) can be useful e.g. when using 'cpu'
|
||||
# controller to limit cpu.shares of this default group and allowing some more
|
||||
# important group take most of the CPU.
|
||||
#
|
||||
# By default, do not create these groups:
|
||||
# CREATE_DEFAULT=yes
|
||||
CREATE_DEFAULT=no
|
12
libcgroup-0.41/samples/cgconfig.sysconfig.config-patch
Normal file
12
libcgroup-0.41/samples/cgconfig.sysconfig.config-patch
Normal file
@ -0,0 +1,12 @@
|
||||
# Service cgconfig can create a default group in all mounted hierarchies and
|
||||
# move all processes there on boot. If no default rule is specified in
|
||||
# /etc/cgrules.conf, the default group is named '/sysdefault'.
|
||||
# This automatically created group(s) can be useful e.g. when using 'cpu'
|
||||
# controller to limit cpu.shares of this default group and allowing some more
|
||||
# important group take most of the CPU.
|
||||
#
|
||||
# By default, create these groups:
|
||||
CREATE_DEFAULT=yes
|
||||
|
||||
# Uncomment following line to disable creation of the default group on startup:
|
||||
# CREATE_DEFAULT=no
|
27
libcgroup-0.41/samples/cgred.conf
Normal file
27
libcgroup-0.41/samples/cgred.conf
Normal file
@ -0,0 +1,27 @@
|
||||
# /etc/sysconfig/cgred.conf - CGroup Rules Engine Daemon configuration file
|
||||
#
|
||||
# The four options listed below (CONFIG_FILE, LOG_FILE, NODAEMON, LOG) are
|
||||
# the only valid ones. Defining anything else in this file will cause the
|
||||
# CGroup Rules Engine program to fail. So, don't do it.
|
||||
|
||||
# The pathname to the configuration file for CGroup Rules Engine
|
||||
CONFIG_FILE="/etc/cgrules.conf"
|
||||
|
||||
# Uncomment the following line to log to specified file instead of syslog
|
||||
#LOG_FILE="/var/log/cgrulesengd.log"
|
||||
|
||||
# Uncomment the second line to run CGroup Rules Engine in non-daemon mode
|
||||
NODAEMON=""
|
||||
#NODAEMON="--nodaemon"
|
||||
|
||||
# Set owner of cgred socket. 'cgexec' tool should have write access there
|
||||
# (either using suid and/or sgid permissions or Linux capabilities).
|
||||
SOCKET_USER=""
|
||||
SOCKET_GROUP="cgred"
|
||||
|
||||
# Uncomment the second line to disable logging for CGroup Rules Engine
|
||||
# Uncomment the third line to enable more verbose logging.
|
||||
LOG=""
|
||||
#LOG="--nolog"
|
||||
#LOG="-v"
|
||||
|
10
libcgroup-0.41/samples/cgrules.conf
Normal file
10
libcgroup-0.41/samples/cgrules.conf
Normal file
@ -0,0 +1,10 @@
|
||||
# /etc/cgrules.conf
|
||||
#The format of this file is described in cgrules.conf(5)
|
||||
#manual page.
|
||||
#
|
||||
# Example:
|
||||
#<user> <controllers> <destination>
|
||||
#@student cpu,memory usergroup/student/
|
||||
#peter cpu test1/
|
||||
#% memory test2/
|
||||
# End of file
|
20
libcgroup-0.41/samples/cgsnapshot_blacklist.conf
Normal file
20
libcgroup-0.41/samples/cgsnapshot_blacklist.conf
Normal file
@ -0,0 +1,20 @@
|
||||
#cgsnapshot tool configuration file
|
||||
|
||||
#memory
|
||||
memory.oom_control
|
||||
|
||||
#cpu
|
||||
|
||||
#cpuacct
|
||||
|
||||
#devices
|
||||
|
||||
#cpuset
|
||||
|
||||
#ns
|
||||
|
||||
#freezer
|
||||
|
||||
#net_cls
|
||||
|
||||
#blkio
|
11
libcgroup-0.41/scripts/Makefile.am
Normal file
11
libcgroup-0.41/scripts/Makefile.am
Normal file
@ -0,0 +1,11 @@
|
||||
EXTRA_DIST = init.d/cgconfig.in init.d/cgred.in
|
||||
|
||||
if WITH_INITSCRIPT_INSTALL
|
||||
INITSCRIPTDIR=$(DESTDIR)$(sysconfdir)/rc.d/init.d
|
||||
install-exec-hook:
|
||||
$(INSTALL) -d $(INITSCRIPTDIR)
|
||||
$(INSTALL_SCRIPT) init.d/cgconfig init.d/cgred $(INITSCRIPTDIR)
|
||||
|
||||
uninstall-hook:
|
||||
rm -f $(INITSCRIPTDIR)/cgconfig $(INITSCRIPTDIR)/cgred
|
||||
endif
|
445
libcgroup-0.41/scripts/Makefile.in
Normal file
445
libcgroup-0.41/scripts/Makefile.in
Normal file
@ -0,0 +1,445 @@
|
||||
# Makefile.in generated by automake 1.13.4 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
VPATH = @srcdir@
|
||||
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = scripts
|
||||
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
FGREP = @FGREP@
|
||||
GREP = @GREP@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LEX = @LEX@
|
||||
LEXLIB = @LEXLIB@
|
||||
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBRARY_VERSION_MAJOR = @LIBRARY_VERSION_MAJOR@
|
||||
LIBRARY_VERSION_MINOR = @LIBRARY_VERSION_MINOR@
|
||||
LIBRARY_VERSION_RELEASE = @LIBRARY_VERSION_RELEASE@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
REALLY_YACC = @REALLY_YACC@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
YACC = @YACC@
|
||||
YFLAGS = @YFLAGS@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pamlibdir = @pamlibdir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
EXTRA_DIST = init.d/cgconfig.in init.d/cgred.in
|
||||
@WITH_INITSCRIPT_INSTALL_TRUE@INITSCRIPTDIR = $(DESTDIR)$(sysconfdir)/rc.d/init.d
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign scripts/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign scripts/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
tags TAGS:
|
||||
|
||||
ctags CTAGS:
|
||||
|
||||
cscope cscopelist:
|
||||
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile
|
||||
installdirs:
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
@WITH_INITSCRIPT_INSTALL_FALSE@install-exec-hook:
|
||||
@WITH_INITSCRIPT_INSTALL_FALSE@uninstall-hook:
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
@$(NORMAL_INSTALL)
|
||||
$(MAKE) $(AM_MAKEFLAGS) install-exec-hook
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am:
|
||||
@$(NORMAL_INSTALL)
|
||||
$(MAKE) $(AM_MAKEFLAGS) uninstall-hook
|
||||
.MAKE: install-am install-exec-am install-strip uninstall-am
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
|
||||
cscopelist-am ctags-am distclean distclean-generic \
|
||||
distclean-libtool distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-dvi \
|
||||
install-dvi-am install-exec install-exec-am install-exec-hook \
|
||||
install-html install-html-am install-info install-info-am \
|
||||
install-man install-pdf install-pdf-am install-ps \
|
||||
install-ps-am install-strip installcheck installcheck-am \
|
||||
installdirs maintainer-clean maintainer-clean-generic \
|
||||
mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
|
||||
ps ps-am tags-am uninstall uninstall-am uninstall-hook
|
||||
|
||||
@WITH_INITSCRIPT_INSTALL_TRUE@install-exec-hook:
|
||||
@WITH_INITSCRIPT_INSTALL_TRUE@ $(INSTALL) -d $(INITSCRIPTDIR)
|
||||
@WITH_INITSCRIPT_INSTALL_TRUE@ $(INSTALL_SCRIPT) init.d/cgconfig init.d/cgred $(INITSCRIPTDIR)
|
||||
|
||||
@WITH_INITSCRIPT_INSTALL_TRUE@uninstall-hook:
|
||||
@WITH_INITSCRIPT_INSTALL_TRUE@ rm -f $(INITSCRIPTDIR)/cgconfig $(INITSCRIPTDIR)/cgred
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
206
libcgroup-0.41/scripts/init.d/cgconfig.in
Normal file
206
libcgroup-0.41/scripts/init.d/cgconfig.in
Normal file
@ -0,0 +1,206 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Start/Stop the workload manager
|
||||
#
|
||||
# Copyright IBM Corporation. 2008
|
||||
#
|
||||
# Authors: Balbir Singh <balbir@linux.vnet.ibm.com>
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of version 2.1 of the GNU Lesser General Public License
|
||||
# as published by the Free Software Foundation.
|
||||
#
|
||||
# This program is distributed in the hope that it would be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
#
|
||||
# cgconfig Control Groups Configuration Startup
|
||||
# chkconfig: - 5 95
|
||||
# description: This script runs the cgconfigparser utility to parse and setup
|
||||
# the control group filesystem. It uses /etc/cgconfig.conf
|
||||
# and parses the configuration specified in there.
|
||||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: cgconfig
|
||||
# Required-Start:
|
||||
# Required-Stop:
|
||||
# Should-Start: ypbind
|
||||
# Should-Stop: ypbind
|
||||
# Short-Description: Create and setup control group filesystem(s)
|
||||
# Description: Create and setup control group filesystem(s)
|
||||
### END INIT INFO
|
||||
|
||||
# get correct location of binaries from configure
|
||||
prefix=@prefix@;exec_prefix=@exec_prefix@;sbindir=@sbindir@
|
||||
CGCONFIGPARSER_BIN=$sbindir/cgconfigparser
|
||||
CONFIG_FILE=/etc/cgconfig.conf
|
||||
servicename=cgconfig
|
||||
lockfile=/var/lock/subsys/$servicename
|
||||
|
||||
#
|
||||
# Source LSB routines
|
||||
#
|
||||
. /lib/lsb/init-functions
|
||||
|
||||
# read the config
|
||||
CREATE_DEFAULT=yes
|
||||
if [ -e /etc/sysconfig/cgconfig ]; then
|
||||
. /etc/sysconfig/cgconfig
|
||||
fi
|
||||
|
||||
create_default_groups() {
|
||||
defaultcgroup=
|
||||
|
||||
if [ -f /etc/cgrules.conf ]; then
|
||||
read user ctrl defaultcgroup <<< \
|
||||
$(grep -m1 '^\*[[:space:]]\+' /etc/cgrules.conf)
|
||||
if [ -n "$defaultcgroup" -a "$defaultcgroup" = "*" ]; then
|
||||
log_warning_msg "/etc/cgrules.conf incorrect"
|
||||
log_warning_msg "Overriding it"
|
||||
defaultcgroup=
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z $defaultcgroup ]
|
||||
then
|
||||
defaultcgroup=sysdefault/
|
||||
fi
|
||||
|
||||
#
|
||||
# Find all mounted subsystems and create comma-separated list
|
||||
# of controllers.
|
||||
#
|
||||
controllers=`lssubsys 2>/dev/null | tr '\n' ',' | sed s/.$//`
|
||||
|
||||
#
|
||||
# Create the default group, ignore errors when the default group
|
||||
# already exists.
|
||||
#
|
||||
cgcreate -f 664 -d 775 -g $controllers:$defaultcgroup 2>/dev/null
|
||||
|
||||
#
|
||||
# special rule for cpusets
|
||||
#
|
||||
if echo $controllers | grep -q -w cpuset; then
|
||||
cpus=`cgget -nv -r cpuset.cpus /`
|
||||
cgset -r cpuset.cpus=$cpus $defaultcgroup
|
||||
mems=`cgget -nv -r cpuset.mems /`
|
||||
cgset -r cpuset.mems=$mems $defaultcgroup
|
||||
fi
|
||||
|
||||
#
|
||||
# Classify everything to default cgroup. Ignore errors, some processes
|
||||
# may exit after ps is run and before cgclassify moves them.
|
||||
#
|
||||
cgclassify -g $controllers:$defaultcgroup `ps --no-headers -eL o tid` \
|
||||
2>/dev/null || :
|
||||
}
|
||||
|
||||
start() {
|
||||
echo -n "Starting cgconfig service: "
|
||||
if [ -f "$lockfile" ]; then
|
||||
log_warning_msg "lock file already exists"
|
||||
return 0
|
||||
fi
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
if [ ! -s $CONFIG_FILE ]; then
|
||||
log_failure_msg $CONFIG_FILE "is not configured"
|
||||
return 6
|
||||
fi
|
||||
|
||||
$CGCONFIGPARSER_BIN -l $CONFIG_FILE
|
||||
retval=$?
|
||||
if [ $retval -ne 0 ]; then
|
||||
log_failure_msg "Failed to parse " $CONFIG_FILE
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $CREATE_DEFAULT = "yes" ]; then
|
||||
create_default_groups
|
||||
fi
|
||||
|
||||
touch "$lockfile"
|
||||
retval=$?
|
||||
if [ $retval -ne 0 ]; then
|
||||
log_failure_msg "Failed to touch $lockfile"
|
||||
return 1
|
||||
fi
|
||||
log_success_msg
|
||||
return 0
|
||||
}
|
||||
|
||||
stop() {
|
||||
echo -n "Stopping cgconfig service: "
|
||||
cgclear
|
||||
rm -f "$lockfile"
|
||||
log_success_msg
|
||||
return 0
|
||||
}
|
||||
|
||||
trapped() {
|
||||
#
|
||||
# Do nothing
|
||||
#
|
||||
true
|
||||
}
|
||||
|
||||
usage() {
|
||||
echo "$0 <start|stop|restart|condrestart|status>"
|
||||
exit 2
|
||||
}
|
||||
|
||||
common() {
|
||||
#
|
||||
# main script work done here
|
||||
#
|
||||
trap "trapped ABRT" ABRT
|
||||
trap "trapped QUIT" QUIT
|
||||
trap "trapped TERM" TERM
|
||||
trap "trapped INT" INT
|
||||
}
|
||||
|
||||
restart() {
|
||||
common
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
RETVAL=0
|
||||
|
||||
case $1 in
|
||||
'stop')
|
||||
common
|
||||
stop
|
||||
RETVAL=$?
|
||||
;;
|
||||
'start')
|
||||
common
|
||||
start
|
||||
RETVAL=$?
|
||||
;;
|
||||
'restart'|'reload')
|
||||
restart
|
||||
RETVAL=$?
|
||||
;;
|
||||
'condrestart')
|
||||
if [ -f "$lockfile" ]; then
|
||||
restart
|
||||
RETVAL=$?
|
||||
fi
|
||||
;;
|
||||
'status')
|
||||
if [ -f "$lockfile" ]; then
|
||||
echo "Running"
|
||||
exit 0
|
||||
else
|
||||
echo "Stopped"
|
||||
exit 3
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
;;
|
||||
esac
|
||||
|
||||
exit $RETVAL
|
161
libcgroup-0.41/scripts/init.d/cgred.in
Normal file
161
libcgroup-0.41/scripts/init.d/cgred.in
Normal file
@ -0,0 +1,161 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Start/Stop the CGroups Rules Engine Daemon
|
||||
#
|
||||
# Copyright Red Hat Inc. 2008
|
||||
#
|
||||
# Authors: Steve Olivieri <sjo@redhat.com>
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of version 2.1 of the GNU Lesser General Public License
|
||||
# as published by the Free Software Foundation.
|
||||
#
|
||||
# This program is distributed in the hope that it would be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
#
|
||||
# cgred CGroups Rules Engine Daemon
|
||||
# chkconfig: - 14 86
|
||||
# description: This is a daemon for automatically classifying processes \
|
||||
# into cgroups based on UID/GID.
|
||||
#
|
||||
# processname: cgrulesengd
|
||||
# pidfile: /var/run/cgred.pid
|
||||
#
|
||||
### BEGIN INIT INFO
|
||||
# Provides: cgrulesengd
|
||||
# Required-Start: $local_fs $syslog $cgconfig
|
||||
# Required-Stop: $local_fs $syslog
|
||||
# Should-Start:
|
||||
# Should-Stop:
|
||||
# Short-Description: start and stop the cgroups rules engine daemon
|
||||
# Description: CGroup Rules Engine is a tool for automatically using \
|
||||
# cgroups to classify processes
|
||||
### END INIT INFO
|
||||
|
||||
prefix=@prefix@;exec_prefix=@exec_prefix@;sbindir=@sbindir@
|
||||
CGRED_BIN=$sbindir/cgrulesengd
|
||||
CGRED_CONF=/etc/cgrules.conf
|
||||
|
||||
# Sanity checks
|
||||
[ -x $CGRED_BIN ] || exit 1
|
||||
|
||||
# Source function library & LSB routines
|
||||
. /etc/rc.d/init.d/functions
|
||||
. /lib/lsb/init-functions
|
||||
|
||||
# Read in configuration options.
|
||||
if [ -f "/etc/sysconfig/cgred.conf" ] ; then
|
||||
. /etc/sysconfig/cgred.conf
|
||||
OPTIONS="$NODAEMON $LOG"
|
||||
if [ -n "$LOG_FILE" ]; then
|
||||
OPTIONS="$OPTIONS --logfile=$LOG_FILE"
|
||||
fi
|
||||
if [ -n "$SOCKET_USER" ]; then
|
||||
OPTIONS="$OPTIONS -u $SOCKET_USER"
|
||||
fi
|
||||
if [ -n "$SOCKET_GROUP" ]; then
|
||||
OPTIONS="$OPTIONS -g $SOCKET_GROUP"
|
||||
fi
|
||||
else
|
||||
OPTIONS=""
|
||||
fi
|
||||
|
||||
# For convenience
|
||||
processname=cgrulesengd
|
||||
servicename=cgred
|
||||
lockfile="/var/lock/subsys/$servicename"
|
||||
pidfile=/var/run/cgred.pid
|
||||
|
||||
start()
|
||||
{
|
||||
echo -n $"Starting CGroup Rules Engine Daemon: "
|
||||
if [ -f "$lockfile" ]; then
|
||||
log_failure_msg "$servicename is already running with PID `cat ${pidfile}`"
|
||||
return 0
|
||||
fi
|
||||
num=`grep "cgroup" /proc/mounts | awk '$3=="cgroup"' | wc -l`
|
||||
if [ $num -eq 0 ]; then
|
||||
echo
|
||||
log_failure_msg $"Cannot find cgroups, is cgconfig service running?"
|
||||
return 1
|
||||
fi
|
||||
daemon --check $servicename --pidfile $pidfile $CGRED_BIN $OPTIONS
|
||||
retval=$?
|
||||
echo
|
||||
if [ $retval -ne 0 ]; then
|
||||
return 7
|
||||
fi
|
||||
touch "$lockfile"
|
||||
if [ $? -ne 0 ]; then
|
||||
return 1
|
||||
fi
|
||||
echo "`pidof $processname`" > $pidfile
|
||||
return 0
|
||||
}
|
||||
|
||||
stop()
|
||||
{
|
||||
echo -n $"Stopping CGroup Rules Engine Daemon..."
|
||||
if [ ! -f $pidfile ]; then
|
||||
log_success_msg
|
||||
return 0
|
||||
fi
|
||||
killproc -p $pidfile -TERM "$processname"
|
||||
retval=$?
|
||||
echo
|
||||
if [ $retval -ne 0 ]; then
|
||||
return 1
|
||||
fi
|
||||
rm -f "$lockfile" "$pidfile"
|
||||
return 0
|
||||
}
|
||||
|
||||
RETVAL=0
|
||||
|
||||
# See how we are called
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
RETVAL=$?
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
RETVAL=$?
|
||||
;;
|
||||
status)
|
||||
status -p $pidfile $servicename
|
||||
RETVAL=$?
|
||||
;;
|
||||
restart)
|
||||
stop
|
||||
start
|
||||
RETVAL=$?
|
||||
;;
|
||||
condrestart)
|
||||
if [ -f "$lockfile" ]; then
|
||||
stop
|
||||
start
|
||||
RETVAL=$?
|
||||
fi
|
||||
;;
|
||||
reload|flash)
|
||||
if [ -f "$lockfile" ]; then
|
||||
echo $"Reloading rules configuration..."
|
||||
kill -s 12 `cat ${pidfile}`
|
||||
RETVAL=$?
|
||||
if [ $RETVAL -eq 0 ] ; then
|
||||
log_success_msg
|
||||
else
|
||||
log_failure_msg
|
||||
fi
|
||||
else
|
||||
log_failure_msg "$servicename is not running."
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $0 {start|stop|status|restart|condrestart|reload}"
|
||||
RETVAL=2
|
||||
;;
|
||||
esac
|
||||
|
||||
exit $RETVAL
|
18
libcgroup-0.41/src/Makefile.am
Normal file
18
libcgroup-0.41/src/Makefile.am
Normal file
@ -0,0 +1,18 @@
|
||||
if WITH_BINDINGS
|
||||
BINDINGS_SUBDIR = bindings
|
||||
endif
|
||||
|
||||
SUBDIRS = . daemon pam tools $(BINDINGS_SUBDIR)
|
||||
|
||||
# generate parse.h from parse.y
|
||||
AM_YFLAGS = -d
|
||||
|
||||
CLEANFILES = lex.c parse.c parse.h
|
||||
|
||||
INCLUDES = -I$(top_srcdir)/include
|
||||
lib_LTLIBRARIES = libcgroup.la
|
||||
libcgroup_la_SOURCES = parse.h parse.y lex.l api.c config.c libcgroup-internal.h libcgroup.map wrapper.c log.c
|
||||
libcgroup_la_LIBADD = -lpthread
|
||||
libcgroup_la_LDFLAGS = -Wl,--version-script,$(srcdir)/libcgroup.map \
|
||||
-version-number $(LIBRARY_VERSION_MAJOR):$(LIBRARY_VERSION_MINOR):$(LIBRARY_VERSION_RELEASE)
|
||||
|
803
libcgroup-0.41/src/Makefile.in
Normal file
803
libcgroup-0.41/src/Makefile.in
Normal file
@ -0,0 +1,803 @@
|
||||
# Makefile.in generated by automake 1.13.4 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
VPATH = @srcdir@
|
||||
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = src
|
||||
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am parse.h \
|
||||
parse.c lex.c $(top_srcdir)/depcomp $(top_srcdir)/ylwrap
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||
am__install_max = 40
|
||||
am__nobase_strip_setup = \
|
||||
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||
am__nobase_strip = \
|
||||
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||
am__nobase_list = $(am__nobase_strip_setup); \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||
if (++n[$$2] == $(am__install_max)) \
|
||||
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||
END { for (dir in files) print dir, files[dir] }'
|
||||
am__base_list = \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||
am__uninstall_files_from_dir = { \
|
||||
test -z "$$files" \
|
||||
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|
||||
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
|
||||
$(am__cd) "$$dir" && rm -f $$files; }; \
|
||||
}
|
||||
am__installdirs = "$(DESTDIR)$(libdir)"
|
||||
LTLIBRARIES = $(lib_LTLIBRARIES)
|
||||
libcgroup_la_DEPENDENCIES =
|
||||
am_libcgroup_la_OBJECTS = parse.lo lex.lo api.lo config.lo wrapper.lo \
|
||||
log.lo
|
||||
libcgroup_la_OBJECTS = $(am_libcgroup_la_OBJECTS)
|
||||
AM_V_lt = $(am__v_lt_@AM_V@)
|
||||
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
|
||||
am__v_lt_0 = --silent
|
||||
am__v_lt_1 =
|
||||
libcgroup_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(libcgroup_la_LDFLAGS) $(LDFLAGS) -o $@
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
am__mv = mv -f
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
AM_V_CC = $(am__v_CC_@AM_V@)
|
||||
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
|
||||
am__v_CC_0 = @echo " CC " $@;
|
||||
am__v_CC_1 =
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
|
||||
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
|
||||
am__v_CCLD_0 = @echo " CCLD " $@;
|
||||
am__v_CCLD_1 =
|
||||
LEXCOMPILE = $(LEX) $(AM_LFLAGS) $(LFLAGS)
|
||||
LTLEXCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=compile $(LEX) $(AM_LFLAGS) $(LFLAGS)
|
||||
AM_V_LEX = $(am__v_LEX_@AM_V@)
|
||||
am__v_LEX_ = $(am__v_LEX_@AM_DEFAULT_V@)
|
||||
am__v_LEX_0 = @echo " LEX " $@;
|
||||
am__v_LEX_1 =
|
||||
YLWRAP = $(top_srcdir)/ylwrap
|
||||
am__yacc_c2h = sed -e s/cc$$/hh/ -e s/cpp$$/hpp/ -e s/cxx$$/hxx/ \
|
||||
-e s/c++$$/h++/ -e s/c$$/h/
|
||||
YACCCOMPILE = $(YACC) $(AM_YFLAGS) $(YFLAGS)
|
||||
LTYACCCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=compile $(YACC) $(AM_YFLAGS) $(YFLAGS)
|
||||
AM_V_YACC = $(am__v_YACC_@AM_V@)
|
||||
am__v_YACC_ = $(am__v_YACC_@AM_DEFAULT_V@)
|
||||
am__v_YACC_0 = @echo " YACC " $@;
|
||||
am__v_YACC_1 =
|
||||
SOURCES = $(libcgroup_la_SOURCES)
|
||||
DIST_SOURCES = $(libcgroup_la_SOURCES)
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
|
||||
ctags-recursive dvi-recursive html-recursive info-recursive \
|
||||
install-data-recursive install-dvi-recursive \
|
||||
install-exec-recursive install-html-recursive \
|
||||
install-info-recursive install-pdf-recursive \
|
||||
install-ps-recursive install-recursive installcheck-recursive \
|
||||
installdirs-recursive pdf-recursive ps-recursive \
|
||||
tags-recursive uninstall-recursive
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
|
||||
distclean-recursive maintainer-clean-recursive
|
||||
am__recursive_targets = \
|
||||
$(RECURSIVE_TARGETS) \
|
||||
$(RECURSIVE_CLEAN_TARGETS) \
|
||||
$(am__extra_recursive_targets)
|
||||
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
|
||||
distdir
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
# Read a list of newline-separated strings from the standard input,
|
||||
# and print each of them once, without duplicates. Input order is
|
||||
# *not* preserved.
|
||||
am__uniquify_input = $(AWK) '\
|
||||
BEGIN { nonempty = 0; } \
|
||||
{ items[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in items) print i; }; } \
|
||||
'
|
||||
# Make sure the list of sources is unique. This is necessary because,
|
||||
# e.g., the same source file might be shared among _SOURCES variables
|
||||
# for different programs/libraries.
|
||||
am__define_uniq_tagged_files = \
|
||||
list='$(am__tagged_files)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | $(am__uniquify_input)`
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DIST_SUBDIRS = . daemon pam tools bindings
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
am__relativize = \
|
||||
dir0=`pwd`; \
|
||||
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
|
||||
sed_rest='s,^[^/]*/*,,'; \
|
||||
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
|
||||
sed_butlast='s,/*[^/]*$$,,'; \
|
||||
while test -n "$$dir1"; do \
|
||||
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
|
||||
if test "$$first" != "."; then \
|
||||
if test "$$first" = ".."; then \
|
||||
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
|
||||
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
|
||||
else \
|
||||
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
|
||||
if test "$$first2" = "$$first"; then \
|
||||
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
|
||||
else \
|
||||
dir2="../$$dir2"; \
|
||||
fi; \
|
||||
dir0="$$dir0"/"$$first"; \
|
||||
fi; \
|
||||
fi; \
|
||||
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
|
||||
done; \
|
||||
reldir="$$dir2"
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
FGREP = @FGREP@
|
||||
GREP = @GREP@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LEX = @LEX@
|
||||
LEXLIB = @LEXLIB@
|
||||
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBRARY_VERSION_MAJOR = @LIBRARY_VERSION_MAJOR@
|
||||
LIBRARY_VERSION_MINOR = @LIBRARY_VERSION_MINOR@
|
||||
LIBRARY_VERSION_RELEASE = @LIBRARY_VERSION_RELEASE@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
REALLY_YACC = @REALLY_YACC@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
YACC = @YACC@
|
||||
YFLAGS = @YFLAGS@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pamlibdir = @pamlibdir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
@WITH_BINDINGS_TRUE@BINDINGS_SUBDIR = bindings
|
||||
SUBDIRS = . daemon pam tools $(BINDINGS_SUBDIR)
|
||||
|
||||
# generate parse.h from parse.y
|
||||
AM_YFLAGS = -d
|
||||
CLEANFILES = lex.c parse.c parse.h
|
||||
INCLUDES = -I$(top_srcdir)/include
|
||||
lib_LTLIBRARIES = libcgroup.la
|
||||
libcgroup_la_SOURCES = parse.h parse.y lex.l api.c config.c libcgroup-internal.h libcgroup.map wrapper.c log.c
|
||||
libcgroup_la_LIBADD = -lpthread
|
||||
libcgroup_la_LDFLAGS = -Wl,--version-script,$(srcdir)/libcgroup.map \
|
||||
-version-number $(LIBRARY_VERSION_MAJOR):$(LIBRARY_VERSION_MINOR):$(LIBRARY_VERSION_RELEASE)
|
||||
|
||||
all: all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .l .lo .o .obj .y
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign src/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
|
||||
list2=; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
list2="$$list2 $$p"; \
|
||||
else :; fi; \
|
||||
done; \
|
||||
test -z "$$list2" || { \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
|
||||
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
|
||||
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
|
||||
}
|
||||
|
||||
uninstall-libLTLIBRARIES:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
|
||||
for p in $$list; do \
|
||||
$(am__strip_dir) \
|
||||
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
|
||||
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
|
||||
done
|
||||
|
||||
clean-libLTLIBRARIES:
|
||||
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
|
||||
@list='$(lib_LTLIBRARIES)'; \
|
||||
locs=`for p in $$list; do echo $$p; done | \
|
||||
sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
|
||||
sort -u`; \
|
||||
test -z "$$locs" || { \
|
||||
echo rm -f $${locs}; \
|
||||
rm -f $${locs}; \
|
||||
}
|
||||
parse.h: parse.c
|
||||
@if test ! -f $@; then rm -f parse.c; else :; fi
|
||||
@if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) parse.c; else :; fi
|
||||
|
||||
libcgroup.la: $(libcgroup_la_OBJECTS) $(libcgroup_la_DEPENDENCIES) $(EXTRA_libcgroup_la_DEPENDENCIES)
|
||||
$(AM_V_CCLD)$(libcgroup_la_LINK) -rpath $(libdir) $(libcgroup_la_OBJECTS) $(libcgroup_la_LIBADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/api.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/config.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lex.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parse.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wrapper.Plo@am__quote@
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
.l.c:
|
||||
$(AM_V_LEX)$(am__skiplex) $(SHELL) $(YLWRAP) $< $(LEX_OUTPUT_ROOT).c $@ -- $(LEXCOMPILE)
|
||||
|
||||
.y.c:
|
||||
$(AM_V_YACC)$(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h `echo $@ | $(am__yacc_c2h)` y.output $*.output -- $(YACCCOMPILE)
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run 'make' without going through this Makefile.
|
||||
# To change the values of 'make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in 'config.status', edit 'config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run 'make');
|
||||
# (2) otherwise, pass the desired values on the 'make' command line.
|
||||
$(am__recursive_targets):
|
||||
@fail=; \
|
||||
if $(am__make_keepgoing); then \
|
||||
failcom='fail=yes'; \
|
||||
else \
|
||||
failcom='exit 1'; \
|
||||
fi; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
ID: $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); mkid -fID $$unique
|
||||
tags: tags-recursive
|
||||
TAGS: tags
|
||||
|
||||
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
empty_fix=.; \
|
||||
else \
|
||||
include_option=--include; \
|
||||
empty_fix=; \
|
||||
fi; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test ! -f $$subdir/TAGS || \
|
||||
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
$(am__define_uniq_tagged_files); \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: ctags-recursive
|
||||
|
||||
CTAGS: ctags
|
||||
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
cscopelist: cscopelist-recursive
|
||||
|
||||
cscopelist-am: $(am__tagged_files)
|
||||
list='$(am__tagged_files)'; \
|
||||
case "$(srcdir)" in \
|
||||
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
||||
*) sdir=$(subdir)/$(srcdir) ;; \
|
||||
esac; \
|
||||
for i in $$list; do \
|
||||
if test -f "$$i"; then \
|
||||
echo "$(subdir)/$$i"; \
|
||||
else \
|
||||
echo "$$sdir/$$i"; \
|
||||
fi; \
|
||||
done >> $(top_builddir)/cscope.files
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
$(am__make_dryrun) \
|
||||
|| test -d "$(distdir)/$$subdir" \
|
||||
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
|
||||
$(am__relativize); \
|
||||
new_distdir=$$reldir; \
|
||||
dir1=$$subdir; dir2="$(top_distdir)"; \
|
||||
$(am__relativize); \
|
||||
new_top_distdir=$$reldir; \
|
||||
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
|
||||
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
|
||||
($(am__cd) $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$$new_top_distdir" \
|
||||
distdir="$$new_distdir" \
|
||||
am__remove_distdir=: \
|
||||
am__skip_length_check=: \
|
||||
am__skip_mode_fix=: \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
all-am: Makefile $(LTLIBRARIES)
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
for dir in "$(DESTDIR)$(libdir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
install-data: install-data-recursive
|
||||
uninstall: uninstall-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
-rm -f lex.c
|
||||
-rm -f parse.c
|
||||
-rm -f parse.h
|
||||
clean: clean-recursive
|
||||
|
||||
clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
|
||||
mostlyclean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-recursive
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-recursive
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-recursive
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am: install-libLTLIBRARIES
|
||||
|
||||
install-html: install-html-recursive
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-recursive
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-recursive
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
pdf: pdf-recursive
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-recursive
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-libLTLIBRARIES
|
||||
|
||||
.MAKE: $(am__recursive_targets) install-am install-strip
|
||||
|
||||
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
|
||||
check-am clean clean-generic clean-libLTLIBRARIES \
|
||||
clean-libtool cscopelist-am ctags ctags-am distclean \
|
||||
distclean-compile distclean-generic distclean-libtool \
|
||||
distclean-tags distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-dvi \
|
||||
install-dvi-am install-exec install-exec-am install-html \
|
||||
install-html-am install-info install-info-am \
|
||||
install-libLTLIBRARIES install-man install-pdf install-pdf-am \
|
||||
install-ps install-ps-am install-strip installcheck \
|
||||
installcheck-am installdirs installdirs-am maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
tags tags-am uninstall uninstall-am uninstall-libLTLIBRARIES
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
4524
libcgroup-0.41/src/api.c
Normal file
4524
libcgroup-0.41/src/api.c
Normal file
File diff suppressed because it is too large
Load Diff
4518
libcgroup-0.41/src/api.c.chmod
Normal file
4518
libcgroup-0.41/src/api.c.chmod
Normal file
File diff suppressed because it is too large
Load Diff
4525
libcgroup-0.41/src/api.c.coverity
Normal file
4525
libcgroup-0.41/src/api.c.coverity
Normal file
File diff suppressed because it is too large
Load Diff
4524
libcgroup-0.41/src/api.c.fread
Normal file
4524
libcgroup-0.41/src/api.c.fread
Normal file
File diff suppressed because it is too large
Load Diff
4524
libcgroup-0.41/src/api.c.templates-fix
Normal file
4524
libcgroup-0.41/src/api.c.templates-fix
Normal file
File diff suppressed because it is too large
Load Diff
15
libcgroup-0.41/src/bindings/Makefile.am
Normal file
15
libcgroup-0.41/src/bindings/Makefile.am
Normal file
@ -0,0 +1,15 @@
|
||||
SUBDIRS = .
|
||||
INCLUDES = -I$(top_srcdir)/include
|
||||
|
||||
lib_LTLIBRARIES = _libcgroup.la
|
||||
_libcgroup_la_SOURCES = libcgroup.c
|
||||
_libcgroup_la_LDFLAGS = $(shell python-config --ldflags) -module -avoid-version
|
||||
_libcgroup_la_CFLAGS = $(shell python-config --cflags)
|
||||
_libcgroup_la_LIBADD = $(top_builddir)/src/.libs/libcgroup.la
|
||||
SWIG=swig
|
||||
|
||||
|
||||
libcgroup.c: libcgroup.p $(top_srcdir)/include/libcgroup.h
|
||||
cp libcgroup.p libcgroup.i
|
||||
$(CC) $(INCLUDES) -DSWIG -E $(top_srcdir)/include/libcgroup.h >> libcgroup.i
|
||||
$(SWIG) -python -o libcgroup.c libcgroup.i
|
774
libcgroup-0.41/src/bindings/Makefile.in
Normal file
774
libcgroup-0.41/src/bindings/Makefile.in
Normal file
@ -0,0 +1,774 @@
|
||||
# Makefile.in generated by automake 1.13.4 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
VPATH = @srcdir@
|
||||
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = src/bindings
|
||||
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
|
||||
$(top_srcdir)/depcomp
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||
am__install_max = 40
|
||||
am__nobase_strip_setup = \
|
||||
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||
am__nobase_strip = \
|
||||
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||
am__nobase_list = $(am__nobase_strip_setup); \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||
if (++n[$$2] == $(am__install_max)) \
|
||||
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||
END { for (dir in files) print dir, files[dir] }'
|
||||
am__base_list = \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||
am__uninstall_files_from_dir = { \
|
||||
test -z "$$files" \
|
||||
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|
||||
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
|
||||
$(am__cd) "$$dir" && rm -f $$files; }; \
|
||||
}
|
||||
am__installdirs = "$(DESTDIR)$(libdir)"
|
||||
LTLIBRARIES = $(lib_LTLIBRARIES)
|
||||
_libcgroup_la_DEPENDENCIES = $(top_builddir)/src/.libs/libcgroup.la
|
||||
am__libcgroup_la_OBJECTS = _libcgroup_la-libcgroup.lo
|
||||
_libcgroup_la_OBJECTS = $(am__libcgroup_la_OBJECTS)
|
||||
AM_V_lt = $(am__v_lt_@AM_V@)
|
||||
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
|
||||
am__v_lt_0 = --silent
|
||||
am__v_lt_1 =
|
||||
_libcgroup_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(_libcgroup_la_CFLAGS) \
|
||||
$(CFLAGS) $(_libcgroup_la_LDFLAGS) $(LDFLAGS) -o $@
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
am__mv = mv -f
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
AM_V_CC = $(am__v_CC_@AM_V@)
|
||||
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
|
||||
am__v_CC_0 = @echo " CC " $@;
|
||||
am__v_CC_1 =
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
|
||||
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
|
||||
am__v_CCLD_0 = @echo " CCLD " $@;
|
||||
am__v_CCLD_1 =
|
||||
SOURCES = $(_libcgroup_la_SOURCES)
|
||||
DIST_SOURCES = $(_libcgroup_la_SOURCES)
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
|
||||
ctags-recursive dvi-recursive html-recursive info-recursive \
|
||||
install-data-recursive install-dvi-recursive \
|
||||
install-exec-recursive install-html-recursive \
|
||||
install-info-recursive install-pdf-recursive \
|
||||
install-ps-recursive install-recursive installcheck-recursive \
|
||||
installdirs-recursive pdf-recursive ps-recursive \
|
||||
tags-recursive uninstall-recursive
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
|
||||
distclean-recursive maintainer-clean-recursive
|
||||
am__recursive_targets = \
|
||||
$(RECURSIVE_TARGETS) \
|
||||
$(RECURSIVE_CLEAN_TARGETS) \
|
||||
$(am__extra_recursive_targets)
|
||||
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
|
||||
distdir
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
# Read a list of newline-separated strings from the standard input,
|
||||
# and print each of them once, without duplicates. Input order is
|
||||
# *not* preserved.
|
||||
am__uniquify_input = $(AWK) '\
|
||||
BEGIN { nonempty = 0; } \
|
||||
{ items[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in items) print i; }; } \
|
||||
'
|
||||
# Make sure the list of sources is unique. This is necessary because,
|
||||
# e.g., the same source file might be shared among _SOURCES variables
|
||||
# for different programs/libraries.
|
||||
am__define_uniq_tagged_files = \
|
||||
list='$(am__tagged_files)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | $(am__uniquify_input)`
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
am__relativize = \
|
||||
dir0=`pwd`; \
|
||||
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
|
||||
sed_rest='s,^[^/]*/*,,'; \
|
||||
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
|
||||
sed_butlast='s,/*[^/]*$$,,'; \
|
||||
while test -n "$$dir1"; do \
|
||||
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
|
||||
if test "$$first" != "."; then \
|
||||
if test "$$first" = ".."; then \
|
||||
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
|
||||
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
|
||||
else \
|
||||
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
|
||||
if test "$$first2" = "$$first"; then \
|
||||
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
|
||||
else \
|
||||
dir2="../$$dir2"; \
|
||||
fi; \
|
||||
dir0="$$dir0"/"$$first"; \
|
||||
fi; \
|
||||
fi; \
|
||||
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
|
||||
done; \
|
||||
reldir="$$dir2"
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
FGREP = @FGREP@
|
||||
GREP = @GREP@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LEX = @LEX@
|
||||
LEXLIB = @LEXLIB@
|
||||
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBRARY_VERSION_MAJOR = @LIBRARY_VERSION_MAJOR@
|
||||
LIBRARY_VERSION_MINOR = @LIBRARY_VERSION_MINOR@
|
||||
LIBRARY_VERSION_RELEASE = @LIBRARY_VERSION_RELEASE@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
REALLY_YACC = @REALLY_YACC@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
YACC = @YACC@
|
||||
YFLAGS = @YFLAGS@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pamlibdir = @pamlibdir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
SUBDIRS = .
|
||||
INCLUDES = -I$(top_srcdir)/include
|
||||
lib_LTLIBRARIES = _libcgroup.la
|
||||
_libcgroup_la_SOURCES = libcgroup.c
|
||||
_libcgroup_la_LDFLAGS = $(shell python-config --ldflags) -module -avoid-version
|
||||
_libcgroup_la_CFLAGS = $(shell python-config --cflags)
|
||||
_libcgroup_la_LIBADD = $(top_builddir)/src/.libs/libcgroup.la
|
||||
SWIG = swig
|
||||
all: all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .lo .o .obj
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/bindings/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign src/bindings/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
|
||||
list2=; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
list2="$$list2 $$p"; \
|
||||
else :; fi; \
|
||||
done; \
|
||||
test -z "$$list2" || { \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
|
||||
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
|
||||
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
|
||||
}
|
||||
|
||||
uninstall-libLTLIBRARIES:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
|
||||
for p in $$list; do \
|
||||
$(am__strip_dir) \
|
||||
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
|
||||
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
|
||||
done
|
||||
|
||||
clean-libLTLIBRARIES:
|
||||
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
|
||||
@list='$(lib_LTLIBRARIES)'; \
|
||||
locs=`for p in $$list; do echo $$p; done | \
|
||||
sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
|
||||
sort -u`; \
|
||||
test -z "$$locs" || { \
|
||||
echo rm -f $${locs}; \
|
||||
rm -f $${locs}; \
|
||||
}
|
||||
|
||||
_libcgroup.la: $(_libcgroup_la_OBJECTS) $(_libcgroup_la_DEPENDENCIES) $(EXTRA__libcgroup_la_DEPENDENCIES)
|
||||
$(AM_V_CCLD)$(_libcgroup_la_LINK) -rpath $(libdir) $(_libcgroup_la_OBJECTS) $(_libcgroup_la_LIBADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_libcgroup_la-libcgroup.Plo@am__quote@
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
_libcgroup_la-libcgroup.lo: libcgroup.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_libcgroup_la_CFLAGS) $(CFLAGS) -MT _libcgroup_la-libcgroup.lo -MD -MP -MF $(DEPDIR)/_libcgroup_la-libcgroup.Tpo -c -o _libcgroup_la-libcgroup.lo `test -f 'libcgroup.c' || echo '$(srcdir)/'`libcgroup.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/_libcgroup_la-libcgroup.Tpo $(DEPDIR)/_libcgroup_la-libcgroup.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libcgroup.c' object='_libcgroup_la-libcgroup.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_libcgroup_la_CFLAGS) $(CFLAGS) -c -o _libcgroup_la-libcgroup.lo `test -f 'libcgroup.c' || echo '$(srcdir)/'`libcgroup.c
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run 'make' without going through this Makefile.
|
||||
# To change the values of 'make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in 'config.status', edit 'config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run 'make');
|
||||
# (2) otherwise, pass the desired values on the 'make' command line.
|
||||
$(am__recursive_targets):
|
||||
@fail=; \
|
||||
if $(am__make_keepgoing); then \
|
||||
failcom='fail=yes'; \
|
||||
else \
|
||||
failcom='exit 1'; \
|
||||
fi; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
ID: $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); mkid -fID $$unique
|
||||
tags: tags-recursive
|
||||
TAGS: tags
|
||||
|
||||
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
empty_fix=.; \
|
||||
else \
|
||||
include_option=--include; \
|
||||
empty_fix=; \
|
||||
fi; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test ! -f $$subdir/TAGS || \
|
||||
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
$(am__define_uniq_tagged_files); \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: ctags-recursive
|
||||
|
||||
CTAGS: ctags
|
||||
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
cscopelist: cscopelist-recursive
|
||||
|
||||
cscopelist-am: $(am__tagged_files)
|
||||
list='$(am__tagged_files)'; \
|
||||
case "$(srcdir)" in \
|
||||
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
||||
*) sdir=$(subdir)/$(srcdir) ;; \
|
||||
esac; \
|
||||
for i in $$list; do \
|
||||
if test -f "$$i"; then \
|
||||
echo "$(subdir)/$$i"; \
|
||||
else \
|
||||
echo "$$sdir/$$i"; \
|
||||
fi; \
|
||||
done >> $(top_builddir)/cscope.files
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
$(am__make_dryrun) \
|
||||
|| test -d "$(distdir)/$$subdir" \
|
||||
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
|
||||
$(am__relativize); \
|
||||
new_distdir=$$reldir; \
|
||||
dir1=$$subdir; dir2="$(top_distdir)"; \
|
||||
$(am__relativize); \
|
||||
new_top_distdir=$$reldir; \
|
||||
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
|
||||
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
|
||||
($(am__cd) $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$$new_top_distdir" \
|
||||
distdir="$$new_distdir" \
|
||||
am__remove_distdir=: \
|
||||
am__skip_length_check=: \
|
||||
am__skip_mode_fix=: \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
all-am: Makefile $(LTLIBRARIES)
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
for dir in "$(DESTDIR)$(libdir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
install-data: install-data-recursive
|
||||
uninstall: uninstall-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-recursive
|
||||
|
||||
clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
|
||||
mostlyclean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-recursive
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-recursive
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-recursive
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am: install-libLTLIBRARIES
|
||||
|
||||
install-html: install-html-recursive
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-recursive
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-recursive
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
pdf: pdf-recursive
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-recursive
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-libLTLIBRARIES
|
||||
|
||||
.MAKE: $(am__recursive_targets) install-am install-strip
|
||||
|
||||
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
|
||||
check-am clean clean-generic clean-libLTLIBRARIES \
|
||||
clean-libtool cscopelist-am ctags ctags-am distclean \
|
||||
distclean-compile distclean-generic distclean-libtool \
|
||||
distclean-tags distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-dvi \
|
||||
install-dvi-am install-exec install-exec-am install-html \
|
||||
install-html-am install-info install-info-am \
|
||||
install-libLTLIBRARIES install-man install-pdf install-pdf-am \
|
||||
install-ps install-ps-am install-strip installcheck \
|
||||
installcheck-am installdirs installdirs-am maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
tags tags-am uninstall uninstall-am uninstall-libLTLIBRARIES
|
||||
|
||||
|
||||
libcgroup.c: libcgroup.p $(top_srcdir)/include/libcgroup.h
|
||||
cp libcgroup.p libcgroup.i
|
||||
$(CC) $(INCLUDES) -DSWIG -E $(top_srcdir)/include/libcgroup.h >> libcgroup.i
|
||||
$(SWIG) -python -o libcgroup.c libcgroup.i
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
8440
libcgroup-0.41/src/bindings/libcgroup.c
Normal file
8440
libcgroup-0.41/src/bindings/libcgroup.c
Normal file
File diff suppressed because it is too large
Load Diff
1687
libcgroup-0.41/src/config.c
Normal file
1687
libcgroup-0.41/src/config.c
Normal file
File diff suppressed because it is too large
Load Diff
1687
libcgroup-0.41/src/config.c.coverity
Normal file
1687
libcgroup-0.41/src/config.c.coverity
Normal file
File diff suppressed because it is too large
Load Diff
10
libcgroup-0.41/src/daemon/Makefile.am
Normal file
10
libcgroup-0.41/src/daemon/Makefile.am
Normal file
@ -0,0 +1,10 @@
|
||||
INCLUDES = -I $(top_srcdir)/include
|
||||
|
||||
if WITH_DAEMON
|
||||
|
||||
sbin_PROGRAMS = cgrulesengd
|
||||
cgrulesengd_SOURCES = cgrulesengd.c cgrulesengd.h
|
||||
cgrulesengd_LDADD = $(top_builddir)/src/.libs/libcgroup.la -lrt
|
||||
cgrulesengd_LDFLAGS = -L$(top_builddir)/src/.libs
|
||||
|
||||
endif
|
633
libcgroup-0.41/src/daemon/Makefile.in
Normal file
633
libcgroup-0.41/src/daemon/Makefile.in
Normal file
@ -0,0 +1,633 @@
|
||||
# Makefile.in generated by automake 1.13.4 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
VPATH = @srcdir@
|
||||
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
@WITH_DAEMON_TRUE@sbin_PROGRAMS = cgrulesengd$(EXEEXT)
|
||||
subdir = src/daemon
|
||||
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
|
||||
$(top_srcdir)/depcomp
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
am__installdirs = "$(DESTDIR)$(sbindir)"
|
||||
PROGRAMS = $(sbin_PROGRAMS)
|
||||
am__cgrulesengd_SOURCES_DIST = cgrulesengd.c cgrulesengd.h
|
||||
@WITH_DAEMON_TRUE@am_cgrulesengd_OBJECTS = cgrulesengd.$(OBJEXT)
|
||||
cgrulesengd_OBJECTS = $(am_cgrulesengd_OBJECTS)
|
||||
@WITH_DAEMON_TRUE@cgrulesengd_DEPENDENCIES = \
|
||||
@WITH_DAEMON_TRUE@ $(top_builddir)/src/.libs/libcgroup.la
|
||||
AM_V_lt = $(am__v_lt_@AM_V@)
|
||||
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
|
||||
am__v_lt_0 = --silent
|
||||
am__v_lt_1 =
|
||||
cgrulesengd_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(cgrulesengd_LDFLAGS) $(LDFLAGS) -o $@
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
am__mv = mv -f
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
AM_V_CC = $(am__v_CC_@AM_V@)
|
||||
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
|
||||
am__v_CC_0 = @echo " CC " $@;
|
||||
am__v_CC_1 =
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
|
||||
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
|
||||
am__v_CCLD_0 = @echo " CCLD " $@;
|
||||
am__v_CCLD_1 =
|
||||
SOURCES = $(cgrulesengd_SOURCES)
|
||||
DIST_SOURCES = $(am__cgrulesengd_SOURCES_DIST)
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
# Read a list of newline-separated strings from the standard input,
|
||||
# and print each of them once, without duplicates. Input order is
|
||||
# *not* preserved.
|
||||
am__uniquify_input = $(AWK) '\
|
||||
BEGIN { nonempty = 0; } \
|
||||
{ items[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in items) print i; }; } \
|
||||
'
|
||||
# Make sure the list of sources is unique. This is necessary because,
|
||||
# e.g., the same source file might be shared among _SOURCES variables
|
||||
# for different programs/libraries.
|
||||
am__define_uniq_tagged_files = \
|
||||
list='$(am__tagged_files)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | $(am__uniquify_input)`
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
FGREP = @FGREP@
|
||||
GREP = @GREP@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LEX = @LEX@
|
||||
LEXLIB = @LEXLIB@
|
||||
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBRARY_VERSION_MAJOR = @LIBRARY_VERSION_MAJOR@
|
||||
LIBRARY_VERSION_MINOR = @LIBRARY_VERSION_MINOR@
|
||||
LIBRARY_VERSION_RELEASE = @LIBRARY_VERSION_RELEASE@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
REALLY_YACC = @REALLY_YACC@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
YACC = @YACC@
|
||||
YFLAGS = @YFLAGS@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pamlibdir = @pamlibdir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
INCLUDES = -I $(top_srcdir)/include
|
||||
@WITH_DAEMON_TRUE@cgrulesengd_SOURCES = cgrulesengd.c cgrulesengd.h
|
||||
@WITH_DAEMON_TRUE@cgrulesengd_LDADD = $(top_builddir)/src/.libs/libcgroup.la -lrt
|
||||
@WITH_DAEMON_TRUE@cgrulesengd_LDFLAGS = -L$(top_builddir)/src/.libs
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .lo .o .obj
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/daemon/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign src/daemon/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
install-sbinPROGRAMS: $(sbin_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
|
||||
if test -n "$$list"; then \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \
|
||||
fi; \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed 's/$(EXEEXT)$$//' | \
|
||||
while read p p1; do if test -f $$p \
|
||||
|| test -f $$p1 \
|
||||
; then echo "$$p"; echo "$$p"; else :; fi; \
|
||||
done | \
|
||||
sed -e 'p;s,.*/,,;n;h' \
|
||||
-e 's|.*|.|' \
|
||||
-e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
|
||||
sed 'N;N;N;s,\n, ,g' | \
|
||||
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
|
||||
{ d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
|
||||
if ($$2 == $$4) files[d] = files[d] " " $$1; \
|
||||
else { print "f", $$3 "/" $$4, $$1; } } \
|
||||
END { for (d in files) print "f", d, files[d] }' | \
|
||||
while read type dir files; do \
|
||||
if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
|
||||
test -z "$$files" || { \
|
||||
echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \
|
||||
$(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \
|
||||
} \
|
||||
; done
|
||||
|
||||
uninstall-sbinPROGRAMS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
|
||||
files=`for p in $$list; do echo "$$p"; done | \
|
||||
sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
|
||||
-e 's/$$/$(EXEEXT)/' \
|
||||
`; \
|
||||
test -n "$$list" || exit 0; \
|
||||
echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
|
||||
cd "$(DESTDIR)$(sbindir)" && rm -f $$files
|
||||
|
||||
clean-sbinPROGRAMS:
|
||||
@list='$(sbin_PROGRAMS)'; test -n "$$list" || exit 0; \
|
||||
echo " rm -f" $$list; \
|
||||
rm -f $$list || exit $$?; \
|
||||
test -n "$(EXEEXT)" || exit 0; \
|
||||
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
|
||||
echo " rm -f" $$list; \
|
||||
rm -f $$list
|
||||
|
||||
cgrulesengd$(EXEEXT): $(cgrulesengd_OBJECTS) $(cgrulesengd_DEPENDENCIES) $(EXTRA_cgrulesengd_DEPENDENCIES)
|
||||
@rm -f cgrulesengd$(EXEEXT)
|
||||
$(AM_V_CCLD)$(cgrulesengd_LINK) $(cgrulesengd_OBJECTS) $(cgrulesengd_LDADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cgrulesengd.Po@am__quote@
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
ID: $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); mkid -fID $$unique
|
||||
tags: tags-am
|
||||
TAGS: tags
|
||||
|
||||
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
$(am__define_uniq_tagged_files); \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: ctags-am
|
||||
|
||||
CTAGS: ctags
|
||||
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
cscopelist: cscopelist-am
|
||||
|
||||
cscopelist-am: $(am__tagged_files)
|
||||
list='$(am__tagged_files)'; \
|
||||
case "$(srcdir)" in \
|
||||
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
||||
*) sdir=$(subdir)/$(srcdir) ;; \
|
||||
esac; \
|
||||
for i in $$list; do \
|
||||
if test -f "$$i"; then \
|
||||
echo "$(subdir)/$$i"; \
|
||||
else \
|
||||
echo "$$sdir/$$i"; \
|
||||
fi; \
|
||||
done >> $(top_builddir)/cscope.files
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(PROGRAMS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(sbindir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool clean-sbinPROGRAMS \
|
||||
mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am: install-sbinPROGRAMS
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-sbinPROGRAMS
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
|
||||
clean-libtool clean-sbinPROGRAMS cscopelist-am ctags ctags-am \
|
||||
distclean distclean-compile distclean-generic \
|
||||
distclean-libtool distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-dvi install-dvi-am install-exec \
|
||||
install-exec-am install-html install-html-am install-info \
|
||||
install-info-am install-man install-pdf install-pdf-am \
|
||||
install-ps install-ps-am install-sbinPROGRAMS install-strip \
|
||||
installcheck installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
tags tags-am uninstall uninstall-am uninstall-sbinPROGRAMS
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
1266
libcgroup-0.41/src/daemon/cgrulesengd.c
Normal file
1266
libcgroup-0.41/src/daemon/cgrulesengd.c
Normal file
File diff suppressed because it is too large
Load Diff
1266
libcgroup-0.41/src/daemon/cgrulesengd.c.coverity
Normal file
1266
libcgroup-0.41/src/daemon/cgrulesengd.c.coverity
Normal file
File diff suppressed because it is too large
Load Diff
125
libcgroup-0.41/src/daemon/cgrulesengd.h
Normal file
125
libcgroup-0.41/src/daemon/cgrulesengd.h
Normal file
@ -0,0 +1,125 @@
|
||||
/*
|
||||
* Copyright Red Hat Inc. 2008
|
||||
*
|
||||
* Author: Steve Olivieri <sjo@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2.1 of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it would be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*/
|
||||
|
||||
#ifndef _CGRULESENGD_H
|
||||
#define _CGRULESENGD_H
|
||||
|
||||
#include <features.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
#include "config.h"
|
||||
#include "libcgroup.h"
|
||||
#include <linux/connector.h>
|
||||
#include <linux/cn_proc.h>
|
||||
|
||||
#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
|
||||
#ifndef __USE_GNU
|
||||
#define __USE_GNU
|
||||
#endif
|
||||
|
||||
/* The following ten macros are all for the Netlink code. */
|
||||
#define SEND_MESSAGE_LEN (NLMSG_LENGTH(sizeof(struct cn_msg) + \
|
||||
sizeof(enum proc_cn_mcast_op)))
|
||||
#define RECV_MESSAGE_LEN (NLMSG_LENGTH(sizeof(struct cn_msg) + \
|
||||
sizeof(struct proc_event)))
|
||||
|
||||
#define SEND_MESSAGE_SIZE (NLMSG_SPACE(SEND_MESSAGE_LEN))
|
||||
#define RECV_MESSAGE_SIZE (NLMSG_SPACE(RECV_MESSAGE_LEN))
|
||||
|
||||
#define BUFF_SIZE (max(max(SEND_MESSAGE_SIZE, RECV_MESSAGE_SIZE), 1024))
|
||||
#define MIN_RECV_SIZE (min(SEND_MESSAGE_SIZE, RECV_MESSAGE_SIZE))
|
||||
|
||||
#define PROC_CN_MCAST_LISTEN (1)
|
||||
#define PROC_CN_MCAST_IGNORE (2)
|
||||
|
||||
/**
|
||||
* Prints the usage information for this program and, optionally, an error
|
||||
* message. This function uses vfprintf.
|
||||
* @param fd The file stream to print to
|
||||
* @param msg The error message to print (printf style)
|
||||
* @param ... Any args to msg (printf style)
|
||||
*/
|
||||
void cgre_usage(FILE *fd, const char *msg, ...);
|
||||
|
||||
/**
|
||||
* Prints a formatted message (like printf()) to all log destinations.
|
||||
* Flushes the file stream's buffer so that the message is immediately
|
||||
* readable.
|
||||
* @param level The log level (LOG_EMERG ... LOG_DEBUG)
|
||||
* @param format The format for the message (printf style)
|
||||
* @param ... Any args to format (printf style)
|
||||
*/
|
||||
void flog(int level, const char *msg, ...);
|
||||
|
||||
/**
|
||||
* Process an event from the kernel, and determine the correct UID/GID/PID to
|
||||
* pass to libcgroup. Then, libcgroup will decide the cgroup to move the PID
|
||||
* to, if any.
|
||||
* @param ev The event to process
|
||||
* @param type The type of event to process (part of ev)
|
||||
* @return 0 on success, > 0 on failure
|
||||
*/
|
||||
int cgre_process_event(const struct proc_event *ev, const int type);
|
||||
|
||||
/**
|
||||
* Handle a netlink message. In the event of PROC_EVENT_UID or PROC_EVENT_GID,
|
||||
* we pass the event along to cgre_process_event for further processing. All
|
||||
* other events are ignored.
|
||||
* @param cn_hdr The netlink message
|
||||
* @return 0 on success, > 0 on error
|
||||
*/
|
||||
int cgre_handle_message(struct cn_msg *cn_hdr);
|
||||
|
||||
/**
|
||||
* Turns this program into a daemon. In doing so, we fork() and kill the
|
||||
* parent process. Note too that stdout, stdin, and stderr are closed in
|
||||
* daemon mode, and a file descriptor for a log file is opened.
|
||||
* @param logp Path of the log file, NULL if no log file was specified
|
||||
* @param logf Syslog facility, NULL if no facility was specified
|
||||
* @param daemon False to turn off daemon mode (no fork, leave FDs open)
|
||||
* @param logv Log verbosity, 2 is the default, 0 = no logging, 5 = everything
|
||||
* @return 0 on success, > 0 on error
|
||||
*/
|
||||
int cgre_start_daemon(const char *logp, const int logf,
|
||||
const unsigned char daemon, const int logv);
|
||||
|
||||
/**
|
||||
* Catch the SIGUSR2 signal and reload the rules configuration. This function
|
||||
* makes use of the logfile and flog() to print the new rules.
|
||||
* @param signum The signal that we caught (always SIGUSR2)
|
||||
*/
|
||||
void cgre_flash_rules(int signum);
|
||||
|
||||
/**
|
||||
* Catch the SIGUSR1 signal and reload the rules configuration. This function
|
||||
* makes use of the logfile and flog() to print the new rules.
|
||||
* @param signum The signal that we caught (always SIGUSR1)
|
||||
*/
|
||||
void cgre_flash_templates(int signum);
|
||||
|
||||
/**
|
||||
* Catch the SIGTERM and SIGINT signal so that we can exit gracefully. Before
|
||||
* exiting, this function makes use of the logfile and flog().
|
||||
* @param signum The signal that we caught (SIGTERM, SIGINT)
|
||||
*/
|
||||
void cgre_catch_term(int signum);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* _CGRULESENGD_H */
|
||||
|
1838
libcgroup-0.41/src/lex.c
Normal file
1838
libcgroup-0.41/src/lex.c
Normal file
File diff suppressed because it is too large
Load Diff
50
libcgroup-0.41/src/lex.l
Normal file
50
libcgroup-0.41/src/lex.l
Normal file
@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Copyright IBM Corporation. 2007
|
||||
*
|
||||
* Authors: Balbir Singh <balbir@linux.vnet.ibm.com>
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2.1 of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it would be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*/
|
||||
|
||||
%{
|
||||
#include <string.h>
|
||||
#include <libcgroup.h>
|
||||
#include <libcgroup-internal.h>
|
||||
#include "parse.h"
|
||||
#pragma GCC diagnostic ignored "-Wunused-function"
|
||||
|
||||
int line_no = 1;
|
||||
jmp_buf parser_error_env;
|
||||
|
||||
#define YY_FATAL_ERROR(msg) \
|
||||
do { \
|
||||
fprintf(stderr, "%s\n", msg); \
|
||||
longjmp(parser_error_env, 1); \
|
||||
} while(0);
|
||||
%}
|
||||
|
||||
%option nounput noinput
|
||||
|
||||
%%
|
||||
\n {line_no++;}
|
||||
[ \t] {/* DO NOTHING */}
|
||||
^[ \t]*#.*[ \t]* {/* Comments */}
|
||||
^\*.*[ \t]* {/* Comments */}
|
||||
"mount" {return MOUNT;}
|
||||
"task" {return TASK;}
|
||||
"admin" {return ADMIN;}
|
||||
"perm" {return PERM;}
|
||||
"group" {return GROUP;}
|
||||
"namespace" {return NAMESPACE;}
|
||||
"template" {return TEMPLATE;}
|
||||
"default" {return DEFAULT;}
|
||||
[a-zA-Z0-9_\-\/\.\,\%\@]+ {yylval.name = strdup(yytext); return ID;}
|
||||
\"[^"]*\" {yylval.name = strdup(yytext+1); yylval.name[strlen(yylval.name)-1] = '\0'; return ID; }
|
||||
. {return yytext[0];}
|
||||
%%
|
||||
|
284
libcgroup-0.41/src/libcgroup-internal.h
Normal file
284
libcgroup-0.41/src/libcgroup-internal.h
Normal file
@ -0,0 +1,284 @@
|
||||
/*
|
||||
* Copyright IBM Corporation. 2008
|
||||
*
|
||||
* Author: Dhaval Giani <dhaval@linux.vnet.ibm.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2.1 of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it would be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
*/
|
||||
#ifndef __LIBCG_INTERNAL
|
||||
|
||||
#define __LIBCG_INTERNAL
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
#include "config.h"
|
||||
#include <fts.h>
|
||||
#include <libcgroup.h>
|
||||
#include <limits.h>
|
||||
#include <pthread.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <setjmp.h>
|
||||
|
||||
/* Maximum number of mount points/controllers */
|
||||
#define MAX_MNT_ELEMENTS 8
|
||||
/* Estimated number of groups created */
|
||||
#define MAX_GROUP_ELEMENTS 128
|
||||
|
||||
#define CG_NV_MAX 100
|
||||
#define CG_CONTROLLER_MAX 100
|
||||
/* Max number of mounted hierarchies. Event if one controller is mounted per
|
||||
* hier, it can not exceed CG_CONTROLLER_MAX
|
||||
*/
|
||||
#define CG_HIER_MAX CG_CONTROLLER_MAX
|
||||
|
||||
/* Definitions for the uid and gid members of a cgroup_rules */
|
||||
/* FIXME: These really should not be negative values */
|
||||
#define CGRULE_INVALID ((uid_t) -1)
|
||||
#define CGRULE_WILD ((uid_t) -2)
|
||||
|
||||
#define CGRULE_SUCCESS_STORE_PID "SUCCESS_STORE_PID"
|
||||
|
||||
|
||||
#define CGCONFIG_CONF_FILE "/etc/cgconfig.conf"
|
||||
|
||||
#define CGRULES_CONF_FILE "/etc/cgrules.conf"
|
||||
#define CGRULES_MAX_FIELDS_PER_LINE 3
|
||||
|
||||
#define CGROUP_BUFFER_LEN (5 * FILENAME_MAX)
|
||||
|
||||
/* Maximum length of a key(<user>:<process name>) in the daemon config file */
|
||||
#define CGROUP_RULE_MAXKEY (LOGIN_NAME_MAX + FILENAME_MAX + 1)
|
||||
|
||||
/* Maximum length of a line in the daemon config file */
|
||||
#define CGROUP_RULE_MAXLINE (FILENAME_MAX + CGROUP_RULE_MAXKEY + \
|
||||
CG_CONTROLLER_MAX + 3)
|
||||
|
||||
#define cgroup_err(x...) cgroup_log(CGROUP_LOG_ERROR, x)
|
||||
#define cgroup_warn(x...) cgroup_log(CGROUP_LOG_WARNING, x)
|
||||
#define cgroup_info(x...) cgroup_log(CGROUP_LOG_INFO, x)
|
||||
#define cgroup_dbg(x...) cgroup_log(CGROUP_LOG_DEBUG, x)
|
||||
|
||||
#define CGROUP_DEFAULT_LOGLEVEL CGROUP_LOG_ERROR
|
||||
|
||||
#define max(x,y) ((y)<(x)?(x):(y))
|
||||
#define min(x,y) ((y)>(x)?(x):(y))
|
||||
|
||||
struct control_value {
|
||||
char name[FILENAME_MAX];
|
||||
char value[CG_VALUE_MAX];
|
||||
bool dirty;
|
||||
};
|
||||
|
||||
struct cgroup_controller {
|
||||
char name[FILENAME_MAX];
|
||||
struct control_value *values[CG_NV_MAX];
|
||||
struct cgroup *cgroup;
|
||||
int index;
|
||||
};
|
||||
|
||||
struct cgroup {
|
||||
char name[FILENAME_MAX];
|
||||
struct cgroup_controller *controller[CG_CONTROLLER_MAX];
|
||||
int index;
|
||||
uid_t tasks_uid;
|
||||
gid_t tasks_gid;
|
||||
mode_t task_fperm;
|
||||
uid_t control_uid;
|
||||
gid_t control_gid;
|
||||
mode_t control_fperm;
|
||||
mode_t control_dperm;
|
||||
};
|
||||
|
||||
struct cg_mount_point {
|
||||
char path[FILENAME_MAX];
|
||||
struct cg_mount_point *next;
|
||||
};
|
||||
|
||||
struct cg_mount_table_s {
|
||||
/** Controller name. */
|
||||
char name[FILENAME_MAX];
|
||||
/**
|
||||
* List of mount points, at least one mount point is there for sure.
|
||||
*/
|
||||
struct cg_mount_point mount;
|
||||
int index;
|
||||
};
|
||||
|
||||
struct cgroup_rules_data {
|
||||
pid_t pid; /* pid of the process which needs to change group */
|
||||
|
||||
/* Details of user under consideration for destination cgroup */
|
||||
struct passwd *pw;
|
||||
/* Gid of the process */
|
||||
gid_t gid;
|
||||
};
|
||||
|
||||
/* A rule that maps UID/GID to a cgroup */
|
||||
struct cgroup_rule {
|
||||
uid_t uid;
|
||||
gid_t gid;
|
||||
char *procname;
|
||||
char username[LOGIN_NAME_MAX];
|
||||
char destination[FILENAME_MAX];
|
||||
char *controllers[MAX_MNT_ELEMENTS];
|
||||
struct cgroup_rule *next;
|
||||
};
|
||||
|
||||
/* Container for a list of rules */
|
||||
struct cgroup_rule_list {
|
||||
struct cgroup_rule *head;
|
||||
struct cgroup_rule *tail;
|
||||
int len;
|
||||
};
|
||||
|
||||
/*The walk_tree handle */
|
||||
struct cgroup_tree_handle {
|
||||
FTS *fts;
|
||||
int flags;
|
||||
};
|
||||
|
||||
/**
|
||||
* Internal item of dictionary. Linked list is sufficient for now - we need
|
||||
* only 'add' operation and simple iterator. In future, this might be easily
|
||||
* rewritten to dynamic array when random access is needed,
|
||||
* just keep in mind that the order is important and the iterator should
|
||||
* return the items in the order they were added there.
|
||||
*/
|
||||
struct cgroup_dictionary_item {
|
||||
const char *name;
|
||||
const char *value;
|
||||
struct cgroup_dictionary_item *next;
|
||||
};
|
||||
|
||||
/* Flags for cgroup_dictionary_create */
|
||||
/**
|
||||
* All items (i.e. both name and value strings) stored in the dictionary
|
||||
* should *NOT* be free()d on cgroup_dictionary_free(),
|
||||
* only the dictionary helper structures (i.e. underlying linked list)
|
||||
* should be freed.
|
||||
*/
|
||||
#define CG_DICT_DONT_FREE_ITEMS 1
|
||||
|
||||
/**
|
||||
* Dictionary of (name, value) items.
|
||||
* The dictionary keeps its order, iterator iterates in the same order
|
||||
* as the items were added there. It is *not* hash-style structure,
|
||||
* it does not provide random access to its items nor quick search.
|
||||
* This structure should be opaque to users of the dictionary, underlying data
|
||||
* structure might change anytime and without warnings.
|
||||
*/
|
||||
struct cgroup_dictionary {
|
||||
struct cgroup_dictionary_item *head;
|
||||
struct cgroup_dictionary_item *tail;
|
||||
int flags;
|
||||
};
|
||||
|
||||
/** Opaque iterator of an dictionary. */
|
||||
struct cgroup_dictionary_iterator {
|
||||
struct cgroup_dictionary_item *item;
|
||||
};
|
||||
|
||||
/**
|
||||
* per thread errno variable, to be used when return code is ECGOTHER
|
||||
*/
|
||||
extern __thread int last_errno;
|
||||
|
||||
/**
|
||||
* 'Exception handler' for lex parser.
|
||||
*/
|
||||
extern jmp_buf parser_error_env;
|
||||
|
||||
/* Internal API */
|
||||
char *cg_build_path(const char *name, char *path, const char *type);
|
||||
int cgroup_get_uid_gid_from_procfs(pid_t pid, uid_t *euid, gid_t *egid);
|
||||
int cgroup_get_procname_from_procfs(pid_t pid, char **procname);
|
||||
int cg_mkdir_p(const char *path);
|
||||
struct cgroup *create_cgroup_from_name_value_pairs(const char *name,
|
||||
struct control_value *name_value, int nv_number);
|
||||
void init_cgroup_table(struct cgroup *cgroups, size_t count);
|
||||
|
||||
/*
|
||||
* Main mounting structures
|
||||
*/
|
||||
extern struct cg_mount_table_s cg_mount_table[CG_CONTROLLER_MAX];
|
||||
extern pthread_rwlock_t cg_mount_table_lock;
|
||||
|
||||
/*
|
||||
* config related structures
|
||||
*/
|
||||
|
||||
extern __thread char *cg_namespace_table[CG_CONTROLLER_MAX];
|
||||
|
||||
/*
|
||||
* config related API
|
||||
*/
|
||||
int cgroup_config_insert_cgroup(char *cg_name);
|
||||
int cgroup_config_parse_controller_options(char *controller,
|
||||
struct cgroup_dictionary *values);
|
||||
int template_config_insert_cgroup(char *cg_name);
|
||||
int template_config_parse_controller_options(char *controller,
|
||||
struct cgroup_dictionary *values);
|
||||
int template_config_group_task_perm(char *perm_type, char *value);
|
||||
int template_config_group_admin_perm(char *perm_type, char *value);
|
||||
int cgroup_config_group_task_perm(char *perm_type, char *value);
|
||||
int cgroup_config_group_admin_perm(char *perm_type, char *value);
|
||||
int cgroup_config_insert_into_mount_table(char *name, char *mount_point);
|
||||
int cgroup_config_insert_into_namespace_table(char *name, char *mount_point);
|
||||
void cgroup_config_cleanup_mount_table(void);
|
||||
void cgroup_config_cleanup_namespace_table(void);
|
||||
int cgroup_config_define_default(void);
|
||||
|
||||
/**
|
||||
* Create an empty dictionary.
|
||||
*/
|
||||
extern int cgroup_dictionary_create(struct cgroup_dictionary **dict,
|
||||
int flags);
|
||||
/**
|
||||
* Add an item to existing dictionary.
|
||||
*/
|
||||
extern int cgroup_dictionary_add(struct cgroup_dictionary *dict,
|
||||
const char *name, const char *value);
|
||||
/**
|
||||
* Fully destroy existing dictionary. Depending on flags passed to
|
||||
* cgroup_dictionary_create(), names and values might get destroyed too.
|
||||
*/
|
||||
extern int cgroup_dictionary_free(struct cgroup_dictionary *dict);
|
||||
|
||||
/**
|
||||
* Start iterating through a dictionary. The items are returned in the same
|
||||
* order as they were added using cgroup_dictionary_add().
|
||||
*/
|
||||
extern int cgroup_dictionary_iterator_begin(struct cgroup_dictionary *dict,
|
||||
void **handle, const char **name, const char **value);
|
||||
/**
|
||||
* Continue iterating through the dictionary.
|
||||
*/
|
||||
extern int cgroup_dictionary_iterator_next(void **handle,
|
||||
const char **name, const char **value);
|
||||
/**
|
||||
* Finish iteration through the dictionary.
|
||||
*/
|
||||
extern void cgroup_dictionary_iterator_end(void **handle);
|
||||
|
||||
/**
|
||||
* Changes permissions for given path. If owner_is_umask is specified
|
||||
* then it uses owner permissions as a mask for group and others permissions.
|
||||
*
|
||||
* @param path Patch to chmod.
|
||||
* @param mode File permissions to set.
|
||||
* @param owner_is_umask Flag whether path owner permissions should be used
|
||||
* as a mask for group and others permissions.
|
||||
*/
|
||||
int cg_chmod_path(const char *path, mode_t mode, int owner_is_umask);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif
|
119
libcgroup-0.41/src/libcgroup.map
Normal file
119
libcgroup-0.41/src/libcgroup.map
Normal file
@ -0,0 +1,119 @@
|
||||
CGROUP_0.32 {
|
||||
global:
|
||||
cgroup_init;
|
||||
cgroup_attach_task;
|
||||
cgroup_modify_cgroup;
|
||||
cgroup_create_cgroup;
|
||||
cgroup_delete_cgroup;
|
||||
cgroup_attach_task_pid;
|
||||
cgroup_get_cgroup;
|
||||
cgroup_create_cgroup_from_parent;
|
||||
cgroup_copy_cgroup;
|
||||
cgroup_change_cgroup_uid_gid;
|
||||
cgroup_change_cgroup_path;
|
||||
cgroup_new_cgroup;
|
||||
cgroup_add_controller;
|
||||
cgroup_free;
|
||||
cgroup_free_controllers;
|
||||
cgroup_add_value_string;
|
||||
cgroup_add_value_int64;
|
||||
cgroup_add_value_uint64;
|
||||
cgroup_add_value_bool;
|
||||
cgroup_compare_cgroup;
|
||||
cgroup_compare_controllers;
|
||||
cgroup_set_uid_gid;
|
||||
cgroup_get_uid_gid;
|
||||
cgroup_get_value_string;
|
||||
cgroup_set_value_string;
|
||||
cgroup_get_value_int64;
|
||||
cgroup_set_value_int64;
|
||||
cgroup_get_value_uint64;
|
||||
cgroup_set_value_uint64;
|
||||
cgroup_get_value_bool;
|
||||
cgroup_set_value_bool;
|
||||
cgroup_change_cgroup_uid_gid_flags;
|
||||
cgroup_print_rules_config;
|
||||
cgroup_reload_cached_rules;
|
||||
cgroup_init_rules_cache;
|
||||
cgroup_get_current_controller_path;
|
||||
cgroup_config_load_config;
|
||||
local:
|
||||
*;
|
||||
};
|
||||
|
||||
CGROUP_0.32.1 {
|
||||
global:
|
||||
cgroup_strerror;
|
||||
} CGROUP_0.32;
|
||||
|
||||
CGROUP_0.33 {
|
||||
global:
|
||||
cgroup_get_last_errno;
|
||||
cgroup_walk_tree_begin;
|
||||
cgroup_walk_tree_next;
|
||||
cgroup_walk_tree_end;
|
||||
} CGROUP_0.32.1;
|
||||
|
||||
CGROUP_0.34 {
|
||||
global:
|
||||
cgroup_get_task_begin;
|
||||
cgroup_get_task_end;
|
||||
cgroup_get_task_next;
|
||||
cgroup_read_stats_begin;
|
||||
cgroup_read_stats_next;
|
||||
cgroup_read_stats_end;
|
||||
cgroup_walk_tree_set_flags;
|
||||
cgroup_get_controller_end;
|
||||
cgroup_get_controller_next;
|
||||
cgroup_get_controller_begin;
|
||||
cgroup_unload_cgroups;
|
||||
cgroup_get_controller;
|
||||
cgroup_get_uid_gid_from_procfs;
|
||||
cgroup_get_subsys_mount_point;
|
||||
cgroup_get_procname_from_procfs;
|
||||
cgroup_register_unchanged_process;
|
||||
cgroup_change_cgroup_flags;
|
||||
} CGROUP_0.33;
|
||||
|
||||
CGROUP_0.35 {
|
||||
global:
|
||||
create_cgroup_from_name_value_pairs;
|
||||
cgroup_delete_cgroup_ext;
|
||||
cgroup_get_all_controller_begin;
|
||||
cgroup_get_all_controller_next;
|
||||
cgroup_get_all_controller_end;
|
||||
cgroup_get_value_name_count;
|
||||
cgroup_get_value_name;
|
||||
} CGROUP_0.34;
|
||||
|
||||
CGROUP_0.36 {
|
||||
} CGROUP_0.35;
|
||||
|
||||
CGROUP_0.37 {
|
||||
cgroup_get_procs;
|
||||
cgroup_read_value_begin;
|
||||
cgroup_read_value_next;
|
||||
cgroup_read_value_end;
|
||||
cg_chmod_recursive;
|
||||
} CGROUP_0.36;
|
||||
|
||||
CGROUP_0.38 {
|
||||
cgroup_get_subsys_mount_point_begin;
|
||||
cgroup_get_subsys_mount_point_next;
|
||||
cgroup_get_subsys_mount_point_end;
|
||||
cgroup_set_permissions;
|
||||
cgroup_config_unload_config;
|
||||
cgroup_config_set_default;
|
||||
} CGROUP_0.37;
|
||||
|
||||
CGROUP_0.39 {
|
||||
cgroup_reload_cached_templates;
|
||||
cgroup_init_templates_cache;
|
||||
cgroup_config_create_template_group;
|
||||
cgroup_change_all_cgroups;
|
||||
cgroup_set_logger;
|
||||
cgroup_set_default_logger;
|
||||
cgroup_set_loglevel;
|
||||
cgroup_log;
|
||||
cgroup_parse_log_level_str;
|
||||
} CGROUP_0.38;
|
96
libcgroup-0.41/src/log.c
Normal file
96
libcgroup-0.41/src/log.c
Normal file
@ -0,0 +1,96 @@
|
||||
/*
|
||||
* Copyright Red Hat, Inc. 2012
|
||||
*
|
||||
* Author: Jan Safranek <jsafrane@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2.1 of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it would be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*/
|
||||
|
||||
#include <libcgroup.h>
|
||||
#include <libcgroup-internal.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include <strings.h>
|
||||
|
||||
static cgroup_logger_callback cgroup_logger;
|
||||
static void *cgroup_logger_userdata;
|
||||
static int cgroup_loglevel;
|
||||
|
||||
static void cgroup_default_logger(void *userdata, int level, const char *fmt,
|
||||
va_list ap)
|
||||
{
|
||||
vfprintf(stdout, fmt, ap);
|
||||
}
|
||||
|
||||
void cgroup_log(int level, const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
if (!cgroup_logger)
|
||||
return;
|
||||
|
||||
if (level > cgroup_loglevel)
|
||||
return;
|
||||
|
||||
va_start(ap, fmt);
|
||||
cgroup_logger(cgroup_logger_userdata, level, fmt, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
void cgroup_set_logger(cgroup_logger_callback logger, int loglevel,
|
||||
void *userdata)
|
||||
{
|
||||
cgroup_logger = logger;
|
||||
cgroup_set_loglevel(loglevel);
|
||||
cgroup_logger_userdata = userdata;
|
||||
}
|
||||
|
||||
void cgroup_set_default_logger(int level)
|
||||
{
|
||||
if (!cgroup_logger)
|
||||
cgroup_set_logger(cgroup_default_logger, level, NULL);
|
||||
}
|
||||
|
||||
int cgroup_parse_log_level_str(const char *levelstr)
|
||||
{
|
||||
char *end;
|
||||
long level;
|
||||
errno = 0;
|
||||
|
||||
/* try to parse integer first */
|
||||
level = strtol(levelstr, &end, 10);
|
||||
if (end != levelstr && *end == '\0')
|
||||
return level;
|
||||
|
||||
if (strcasecmp(levelstr, "ERROR") == 0)
|
||||
return CGROUP_LOG_ERROR;
|
||||
if (strcasecmp(levelstr, "WARNING") == 0)
|
||||
return CGROUP_LOG_WARNING;
|
||||
if (strcasecmp(levelstr, "INFO") == 0)
|
||||
return CGROUP_LOG_INFO;
|
||||
if (strcasecmp(levelstr, "DEBUG") == 0)
|
||||
return CGROUP_LOG_DEBUG;
|
||||
|
||||
return CGROUP_DEFAULT_LOGLEVEL;
|
||||
}
|
||||
|
||||
void cgroup_set_loglevel(int loglevel)
|
||||
{
|
||||
if (loglevel != -1)
|
||||
cgroup_loglevel = loglevel;
|
||||
else {
|
||||
char *level_str = getenv("CGROUP_LOGLEVEL");
|
||||
if (level_str != NULL)
|
||||
cgroup_loglevel = cgroup_parse_log_level_str(level_str);
|
||||
else
|
||||
cgroup_loglevel = CGROUP_DEFAULT_LOGLEVEL;
|
||||
}
|
||||
}
|
10
libcgroup-0.41/src/pam/Makefile.am
Normal file
10
libcgroup-0.41/src/pam/Makefile.am
Normal file
@ -0,0 +1,10 @@
|
||||
INCLUDES = -I $(top_srcdir)/include
|
||||
|
||||
if WITH_PAM
|
||||
|
||||
pamlib_LTLIBRARIES = pam_cgroup.la
|
||||
pam_cgroup_la_SOURCES = pam_cgroup.c
|
||||
pam_cgroup_la_LDFLAGS = -module
|
||||
pam_cgroup_la_LIBADD = $(top_builddir)/src/.libs/libcgroup.la -lpam
|
||||
|
||||
endif
|
647
libcgroup-0.41/src/pam/Makefile.in
Normal file
647
libcgroup-0.41/src/pam/Makefile.in
Normal file
@ -0,0 +1,647 @@
|
||||
# Makefile.in generated by automake 1.13.4 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
VPATH = @srcdir@
|
||||
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = src/pam
|
||||
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
|
||||
$(top_srcdir)/depcomp
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||
am__install_max = 40
|
||||
am__nobase_strip_setup = \
|
||||
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||
am__nobase_strip = \
|
||||
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||
am__nobase_list = $(am__nobase_strip_setup); \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||
if (++n[$$2] == $(am__install_max)) \
|
||||
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||
END { for (dir in files) print dir, files[dir] }'
|
||||
am__base_list = \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||
am__uninstall_files_from_dir = { \
|
||||
test -z "$$files" \
|
||||
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|
||||
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
|
||||
$(am__cd) "$$dir" && rm -f $$files; }; \
|
||||
}
|
||||
am__installdirs = "$(DESTDIR)$(pamlibdir)"
|
||||
LTLIBRARIES = $(pamlib_LTLIBRARIES)
|
||||
@WITH_PAM_TRUE@pam_cgroup_la_DEPENDENCIES = \
|
||||
@WITH_PAM_TRUE@ $(top_builddir)/src/.libs/libcgroup.la
|
||||
am__pam_cgroup_la_SOURCES_DIST = pam_cgroup.c
|
||||
@WITH_PAM_TRUE@am_pam_cgroup_la_OBJECTS = pam_cgroup.lo
|
||||
pam_cgroup_la_OBJECTS = $(am_pam_cgroup_la_OBJECTS)
|
||||
AM_V_lt = $(am__v_lt_@AM_V@)
|
||||
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
|
||||
am__v_lt_0 = --silent
|
||||
am__v_lt_1 =
|
||||
pam_cgroup_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(pam_cgroup_la_LDFLAGS) $(LDFLAGS) -o $@
|
||||
@WITH_PAM_TRUE@am_pam_cgroup_la_rpath = -rpath $(pamlibdir)
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
am__mv = mv -f
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
AM_V_CC = $(am__v_CC_@AM_V@)
|
||||
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
|
||||
am__v_CC_0 = @echo " CC " $@;
|
||||
am__v_CC_1 =
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
|
||||
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
|
||||
am__v_CCLD_0 = @echo " CCLD " $@;
|
||||
am__v_CCLD_1 =
|
||||
SOURCES = $(pam_cgroup_la_SOURCES)
|
||||
DIST_SOURCES = $(am__pam_cgroup_la_SOURCES_DIST)
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
# Read a list of newline-separated strings from the standard input,
|
||||
# and print each of them once, without duplicates. Input order is
|
||||
# *not* preserved.
|
||||
am__uniquify_input = $(AWK) '\
|
||||
BEGIN { nonempty = 0; } \
|
||||
{ items[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in items) print i; }; } \
|
||||
'
|
||||
# Make sure the list of sources is unique. This is necessary because,
|
||||
# e.g., the same source file might be shared among _SOURCES variables
|
||||
# for different programs/libraries.
|
||||
am__define_uniq_tagged_files = \
|
||||
list='$(am__tagged_files)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | $(am__uniquify_input)`
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
FGREP = @FGREP@
|
||||
GREP = @GREP@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LEX = @LEX@
|
||||
LEXLIB = @LEXLIB@
|
||||
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBRARY_VERSION_MAJOR = @LIBRARY_VERSION_MAJOR@
|
||||
LIBRARY_VERSION_MINOR = @LIBRARY_VERSION_MINOR@
|
||||
LIBRARY_VERSION_RELEASE = @LIBRARY_VERSION_RELEASE@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
REALLY_YACC = @REALLY_YACC@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
YACC = @YACC@
|
||||
YFLAGS = @YFLAGS@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pamlibdir = @pamlibdir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
INCLUDES = -I $(top_srcdir)/include
|
||||
@WITH_PAM_TRUE@pamlib_LTLIBRARIES = pam_cgroup.la
|
||||
@WITH_PAM_TRUE@pam_cgroup_la_SOURCES = pam_cgroup.c
|
||||
@WITH_PAM_TRUE@pam_cgroup_la_LDFLAGS = -module
|
||||
@WITH_PAM_TRUE@pam_cgroup_la_LIBADD = $(top_builddir)/src/.libs/libcgroup.la -lpam
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .lo .o .obj
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/pam/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign src/pam/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
install-pamlibLTLIBRARIES: $(pamlib_LTLIBRARIES)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list='$(pamlib_LTLIBRARIES)'; test -n "$(pamlibdir)" || list=; \
|
||||
list2=; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
list2="$$list2 $$p"; \
|
||||
else :; fi; \
|
||||
done; \
|
||||
test -z "$$list2" || { \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(pamlibdir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(pamlibdir)" || exit 1; \
|
||||
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pamlibdir)'"; \
|
||||
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pamlibdir)"; \
|
||||
}
|
||||
|
||||
uninstall-pamlibLTLIBRARIES:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(pamlib_LTLIBRARIES)'; test -n "$(pamlibdir)" || list=; \
|
||||
for p in $$list; do \
|
||||
$(am__strip_dir) \
|
||||
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pamlibdir)/$$f'"; \
|
||||
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pamlibdir)/$$f"; \
|
||||
done
|
||||
|
||||
clean-pamlibLTLIBRARIES:
|
||||
-test -z "$(pamlib_LTLIBRARIES)" || rm -f $(pamlib_LTLIBRARIES)
|
||||
@list='$(pamlib_LTLIBRARIES)'; \
|
||||
locs=`for p in $$list; do echo $$p; done | \
|
||||
sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
|
||||
sort -u`; \
|
||||
test -z "$$locs" || { \
|
||||
echo rm -f $${locs}; \
|
||||
rm -f $${locs}; \
|
||||
}
|
||||
|
||||
pam_cgroup.la: $(pam_cgroup_la_OBJECTS) $(pam_cgroup_la_DEPENDENCIES) $(EXTRA_pam_cgroup_la_DEPENDENCIES)
|
||||
$(AM_V_CCLD)$(pam_cgroup_la_LINK) $(am_pam_cgroup_la_rpath) $(pam_cgroup_la_OBJECTS) $(pam_cgroup_la_LIBADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pam_cgroup.Plo@am__quote@
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
ID: $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); mkid -fID $$unique
|
||||
tags: tags-am
|
||||
TAGS: tags
|
||||
|
||||
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
$(am__define_uniq_tagged_files); \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: ctags-am
|
||||
|
||||
CTAGS: ctags
|
||||
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
cscopelist: cscopelist-am
|
||||
|
||||
cscopelist-am: $(am__tagged_files)
|
||||
list='$(am__tagged_files)'; \
|
||||
case "$(srcdir)" in \
|
||||
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
||||
*) sdir=$(subdir)/$(srcdir) ;; \
|
||||
esac; \
|
||||
for i in $$list; do \
|
||||
if test -f "$$i"; then \
|
||||
echo "$(subdir)/$$i"; \
|
||||
else \
|
||||
echo "$$sdir/$$i"; \
|
||||
fi; \
|
||||
done >> $(top_builddir)/cscope.files
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(LTLIBRARIES)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(pamlibdir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool clean-pamlibLTLIBRARIES \
|
||||
mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-pamlibLTLIBRARIES
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-pamlibLTLIBRARIES
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
|
||||
clean-libtool clean-pamlibLTLIBRARIES cscopelist-am ctags \
|
||||
ctags-am distclean distclean-compile distclean-generic \
|
||||
distclean-libtool distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-dvi install-dvi-am install-exec \
|
||||
install-exec-am install-html install-html-am install-info \
|
||||
install-info-am install-man install-pamlibLTLIBRARIES \
|
||||
install-pdf install-pdf-am install-ps install-ps-am \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
|
||||
pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
|
||||
uninstall-pamlibLTLIBRARIES
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
163
libcgroup-0.41/src/pam/pam_cgroup.c
Normal file
163
libcgroup-0.41/src/pam/pam_cgroup.c
Normal file
@ -0,0 +1,163 @@
|
||||
/*
|
||||
* Copyright RedHat Inc. 2008
|
||||
*
|
||||
* Author: Vivek Goyal <vgoyal@redhat.com>
|
||||
*
|
||||
* Derived from pam_limits.c. Original Copyright notice follows.
|
||||
*
|
||||
* Copyright (c) Cristian Gafton, 1996-1997, <gafton@redhat.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, and the entire permission notice in its entirety,
|
||||
* including the disclaimer of warranties.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote
|
||||
* products derived from this software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
* ALTERNATIVELY, this product may be distributed under the terms of
|
||||
* the GNU Public License, in which case the provisions of the GPL are
|
||||
* required INSTEAD OF the above restrictions. (This clause is
|
||||
* necessary due to a potential bad interaction between the GPL and
|
||||
* the restrictions contained in a BSD-style copyright.)
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* End of original copyright notice.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2.1 of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it would be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include <syslog.h>
|
||||
#include <libcgroup.h>
|
||||
#include <pwd.h>
|
||||
|
||||
/*
|
||||
* Module defines
|
||||
*/
|
||||
|
||||
#define PAM_SM_SESSION
|
||||
|
||||
#include <security/pam_modules.h>
|
||||
#include <security/_pam_macros.h>
|
||||
#include <security/pam_modutil.h>
|
||||
#include <security/pam_ext.h>
|
||||
|
||||
/* argument parsing */
|
||||
|
||||
#define PAM_DEBUG_ARG 0x0001
|
||||
|
||||
static int _pam_parse(const pam_handle_t *pamh, int argc, const char **argv)
|
||||
{
|
||||
int ctrl = 0;
|
||||
|
||||
/* step through arguments */
|
||||
for (ctrl = 0; argc-- > 0; ++argv) {
|
||||
if (!strcmp(*argv, "debug"))
|
||||
ctrl |= PAM_DEBUG_ARG;
|
||||
else
|
||||
pam_syslog(pamh, LOG_ERR, "unknown option: %s", *argv);
|
||||
}
|
||||
|
||||
return ctrl;
|
||||
}
|
||||
|
||||
/* now the session stuff */
|
||||
PAM_EXTERN int pam_sm_open_session(pam_handle_t *pamh, int flags,
|
||||
int argc, const char **argv)
|
||||
{
|
||||
pid_t pid;
|
||||
int ctrl, ret;
|
||||
char *user_name;
|
||||
struct passwd *pwd;
|
||||
|
||||
D(("called."));
|
||||
|
||||
ctrl = _pam_parse(pamh, argc, argv);
|
||||
|
||||
ret = pam_get_item(pamh, PAM_USER, (void *) &user_name);
|
||||
if (user_name == NULL || ret != PAM_SUCCESS) {
|
||||
pam_syslog(pamh, LOG_ERR, "open_session - error recovering"
|
||||
"username");
|
||||
return PAM_SESSION_ERR;
|
||||
}
|
||||
|
||||
pwd = pam_modutil_getpwnam(pamh, user_name);
|
||||
if (!pwd) {
|
||||
if (ctrl & PAM_DEBUG_ARG)
|
||||
pam_syslog(pamh, LOG_ERR, "open_session username"
|
||||
" '%s' does not exist", user_name);
|
||||
return PAM_SESSION_ERR;
|
||||
}
|
||||
|
||||
D(("user name is %s", user_name));
|
||||
|
||||
/* Initialize libcg */
|
||||
ret = cgroup_init();
|
||||
if (ret) {
|
||||
if (ctrl & PAM_DEBUG_ARG)
|
||||
pam_syslog(pamh, LOG_ERR, "libcgroup initialization"
|
||||
" failed");
|
||||
return PAM_SESSION_ERR;
|
||||
}
|
||||
|
||||
D(("Initialized libcgroup successfuly."));
|
||||
|
||||
/* Determine the pid of the task */
|
||||
pid = getpid();
|
||||
|
||||
/* Note: We are using default gid here. Is there a way to determine
|
||||
* under what egid service will be provided?
|
||||
*/
|
||||
ret = cgroup_change_cgroup_uid_gid_flags(pwd->pw_uid,
|
||||
pwd->pw_gid, pid, CGFLAG_USECACHE);
|
||||
if (ret) {
|
||||
if (ctrl & PAM_DEBUG_ARG)
|
||||
pam_syslog(pamh, LOG_ERR, "Change of cgroup for process"
|
||||
" with username %s failed.\n", user_name);
|
||||
return PAM_SESSION_ERR;
|
||||
}
|
||||
|
||||
if (ctrl & PAM_DEBUG_ARG)
|
||||
pam_syslog(pamh, LOG_DEBUG, "Changed cgroup for process %d"
|
||||
" with username %s.\n", pid, user_name);
|
||||
|
||||
return PAM_SUCCESS;
|
||||
}
|
||||
|
||||
PAM_EXTERN int pam_sm_close_session(pam_handle_t *pamh, int flags, int argc,
|
||||
const char **argv)
|
||||
{
|
||||
D(("called pam_cgroup close session"));
|
||||
|
||||
/* nothing to do yet */
|
||||
return PAM_SUCCESS;
|
||||
}
|
1036
libcgroup-0.41/src/parse.c
Normal file
1036
libcgroup-0.41/src/parse.c
Normal file
File diff suppressed because it is too large
Load Diff
23
libcgroup-0.41/src/parse.h
Normal file
23
libcgroup-0.41/src/parse.h
Normal file
@ -0,0 +1,23 @@
|
||||
#define ID 257
|
||||
#define MOUNT 258
|
||||
#define GROUP 259
|
||||
#define PERM 260
|
||||
#define TASK 261
|
||||
#define ADMIN 262
|
||||
#define NAMESPACE 263
|
||||
#define DEFAULT 264
|
||||
#define TEMPLATE 265
|
||||
#ifdef YYSTYPE
|
||||
#undef YYSTYPE_IS_DECLARED
|
||||
#define YYSTYPE_IS_DECLARED 1
|
||||
#endif
|
||||
#ifndef YYSTYPE_IS_DECLARED
|
||||
#define YYSTYPE_IS_DECLARED 1
|
||||
typedef union {
|
||||
char *name;
|
||||
char chr;
|
||||
int val;
|
||||
struct cgroup_dictionary *values;
|
||||
} YYSTYPE;
|
||||
#endif /* !YYSTYPE_IS_DECLARED */
|
||||
extern YYSTYPE yylval;
|
502
libcgroup-0.41/src/parse.y
Normal file
502
libcgroup-0.41/src/parse.y
Normal file
@ -0,0 +1,502 @@
|
||||
/*
|
||||
* Copyright IBM Corporation. 2007
|
||||
*
|
||||
* Authors: Balbir Singh <balbir@linux.vnet.ibm.com>
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2.1 of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it would be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* NOTE: The grammar has been modified, not to be the most efficient, but
|
||||
* to allow easy updation of internal data structures.
|
||||
*/
|
||||
%{
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <libcgroup.h>
|
||||
#include <libcgroup-internal.h>
|
||||
|
||||
int yylex(void);
|
||||
extern int line_no;
|
||||
extern char *yytext;
|
||||
|
||||
static void yyerror(const char *s)
|
||||
{
|
||||
fprintf(stderr, "error at line number %d at %s:%s\n", line_no, yytext,
|
||||
s);
|
||||
}
|
||||
|
||||
int yywrap(void)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
%}
|
||||
|
||||
%token ID MOUNT GROUP PERM TASK ADMIN NAMESPACE DEFAULT TEMPLATE
|
||||
|
||||
%union {
|
||||
char *name;
|
||||
char chr;
|
||||
int val;
|
||||
struct cgroup_dictionary *values;
|
||||
}
|
||||
%type <name> ID
|
||||
%type <val> mountvalue_conf mount task_namevalue_conf admin_namevalue_conf
|
||||
%type <val> admin_conf task_conf task_or_admin group_conf group start
|
||||
%type <val> namespace namespace_conf default default_conf
|
||||
%type <values> namevalue_conf
|
||||
%type <val> template template_conf
|
||||
%type <val> template_task_or_admin template_task_namevalue_conf
|
||||
%type <val> template_admin_namevalue_conf template_task_conf
|
||||
%type <val> template_admin_conf
|
||||
%start start
|
||||
%%
|
||||
|
||||
start : start group
|
||||
{
|
||||
$$ = $1;
|
||||
}
|
||||
| start mount
|
||||
{
|
||||
$$ = $1;
|
||||
}
|
||||
| start default
|
||||
{
|
||||
$$ = $1;
|
||||
}
|
||||
| start namespace
|
||||
{
|
||||
$$ = $1;
|
||||
}
|
||||
| start template
|
||||
{
|
||||
$$ = $1;
|
||||
}
|
||||
|
|
||||
{
|
||||
$$ = 1;
|
||||
}
|
||||
;
|
||||
|
||||
default : DEFAULT '{' default_conf '}'
|
||||
{
|
||||
$$ = $3;
|
||||
if ($$) {
|
||||
cgroup_config_define_default();
|
||||
}
|
||||
}
|
||||
;
|
||||
|
||||
default_conf
|
||||
: PERM '{' task_or_admin '}'
|
||||
{
|
||||
$$ = $3;
|
||||
}
|
||||
;
|
||||
|
||||
group : GROUP ID '{' group_conf '}'
|
||||
{
|
||||
$$ = $4;
|
||||
if ($$) {
|
||||
$$ = cgroup_config_insert_cgroup($2);
|
||||
if (!$$) {
|
||||
fprintf(stderr, "failed to insert group"
|
||||
" check size and memory");
|
||||
$$ = ECGOTHER;
|
||||
return $$;
|
||||
}
|
||||
} else {
|
||||
fprintf(stderr, "parsing failed at line number %d\n",
|
||||
line_no);
|
||||
$$ = ECGCONFIGPARSEFAIL;
|
||||
return $$;
|
||||
}
|
||||
}
|
||||
;
|
||||
|
||||
group_conf
|
||||
: ID '{' namevalue_conf '}'
|
||||
{
|
||||
$$ = cgroup_config_parse_controller_options($1, $3);
|
||||
cgroup_dictionary_free($3);
|
||||
if (!$$) {
|
||||
fprintf(stderr, "parsing failed at line number %d\n",
|
||||
line_no);
|
||||
$$ = ECGCONFIGPARSEFAIL;
|
||||
return $$;
|
||||
}
|
||||
}
|
||||
| group_conf ID '{' namevalue_conf '}'
|
||||
{
|
||||
$$ = cgroup_config_parse_controller_options($2, $4);
|
||||
cgroup_dictionary_free($4);
|
||||
if (!$$) {
|
||||
fprintf(stderr, "parsing failed at line number %d\n",
|
||||
line_no);
|
||||
$$ = ECGCONFIGPARSEFAIL;
|
||||
return $$;
|
||||
}
|
||||
}
|
||||
| PERM '{' task_or_admin '}'
|
||||
{
|
||||
$$ = $3;
|
||||
if (!$$) {
|
||||
fprintf(stderr, "parsing failed at line number %d\n",
|
||||
line_no);
|
||||
$$ = ECGCONFIGPARSEFAIL;
|
||||
return $$;
|
||||
}
|
||||
}
|
||||
;
|
||||
|
||||
template : TEMPLATE ID '{' template_conf '}'
|
||||
{
|
||||
$$ = $4;
|
||||
if ($$) {
|
||||
$$ = template_config_insert_cgroup($2);
|
||||
if (!$$) {
|
||||
fprintf(stderr, "parsing failed at line number %d\n",
|
||||
line_no);
|
||||
$$ = ECGOTHER;
|
||||
return $$;
|
||||
}
|
||||
} else {
|
||||
fprintf(stderr, "parsing failed at line number %d\n",
|
||||
line_no);
|
||||
$$ = ECGCONFIGPARSEFAIL;
|
||||
return $$;
|
||||
}
|
||||
}
|
||||
;
|
||||
|
||||
|
||||
template_conf
|
||||
: ID '{' namevalue_conf '}'
|
||||
{
|
||||
$$ = template_config_parse_controller_options($1, $3);
|
||||
cgroup_dictionary_free($3);
|
||||
if (!$$) {
|
||||
fprintf(stderr, "parsing failed at line number %d\n",
|
||||
line_no);
|
||||
$$ = ECGCONFIGPARSEFAIL;
|
||||
return $$;
|
||||
}
|
||||
}
|
||||
| template_conf ID '{' namevalue_conf '}'
|
||||
{
|
||||
$$ = template_config_parse_controller_options($2, $4);
|
||||
cgroup_dictionary_free($4);
|
||||
if (!$$) {
|
||||
fprintf(stderr, "parsing failed at line number %d\n",
|
||||
line_no);
|
||||
$$ = ECGCONFIGPARSEFAIL;
|
||||
return $$;
|
||||
}
|
||||
}
|
||||
| PERM '{' template_task_or_admin '}'
|
||||
{
|
||||
$$ = $3;
|
||||
if (!$$) {
|
||||
fprintf(stderr, "parsing failed at line number %d\n",
|
||||
line_no);
|
||||
$$ = ECGCONFIGPARSEFAIL;
|
||||
return $$;
|
||||
}
|
||||
}
|
||||
;
|
||||
|
||||
template_task_or_admin
|
||||
: TASK '{' template_task_namevalue_conf '}' template_admin_conf
|
||||
{
|
||||
$$ = $3 && $5;
|
||||
if (!$$) {
|
||||
fprintf(stderr, "parsing failed at line number %d\n",
|
||||
line_no);
|
||||
$$ = ECGCONFIGPARSEFAIL;
|
||||
return $$;
|
||||
}
|
||||
}
|
||||
| ADMIN '{' template_admin_namevalue_conf '}' template_task_conf
|
||||
{
|
||||
$$ = $3 && $5;
|
||||
if (!$$) {
|
||||
fprintf(stderr, "parsing failed at line number %d\n",
|
||||
line_no);
|
||||
$$ = ECGCONFIGPARSEFAIL;
|
||||
return $$;
|
||||
}
|
||||
}
|
||||
;
|
||||
|
||||
|
||||
namevalue_conf
|
||||
: ID '=' ID ';'
|
||||
{
|
||||
struct cgroup_dictionary *dict;
|
||||
int ret;
|
||||
ret = cgroup_dictionary_create(&dict, 0);
|
||||
if (ret == 0)
|
||||
ret = cgroup_dictionary_add(dict, $1, $3);
|
||||
if (ret) {
|
||||
fprintf(stderr, "parsing failed at line number %d:%s\n",
|
||||
line_no, cgroup_strerror(ret));
|
||||
$$ = NULL;
|
||||
cgroup_dictionary_free(dict);
|
||||
return ECGCONFIGPARSEFAIL;
|
||||
}
|
||||
$$ = dict;
|
||||
}
|
||||
| namevalue_conf ID '=' ID ';'
|
||||
{
|
||||
int ret = 0;
|
||||
ret = cgroup_dictionary_add($1, $2, $4);
|
||||
if (ret != 0) {
|
||||
fprintf(stderr, "parsing failed at line number %d: %s\n",
|
||||
line_no, cgroup_strerror(ret));
|
||||
$$ = NULL;
|
||||
return ECGCONFIGPARSEFAIL;
|
||||
}
|
||||
$$ = $1;
|
||||
}
|
||||
|
|
||||
{
|
||||
$$ = NULL;
|
||||
}
|
||||
;
|
||||
|
||||
task_namevalue_conf
|
||||
: ID '=' ID ';'
|
||||
{
|
||||
$$ = cgroup_config_group_task_perm($1, $3);
|
||||
if (!$$) {
|
||||
fprintf(stderr, "parsing failed at line number %d\n",
|
||||
line_no);
|
||||
$$ = ECGCONFIGPARSEFAIL;
|
||||
return $$;
|
||||
}
|
||||
}
|
||||
| task_namevalue_conf ID '=' ID ';'
|
||||
{
|
||||
$$ = $1 && cgroup_config_group_task_perm($2, $4);
|
||||
if (!$$) {
|
||||
fprintf(stderr, "parsing failed at line number %d\n",
|
||||
line_no);
|
||||
$$ = ECGCONFIGPARSEFAIL;
|
||||
return $$;
|
||||
}
|
||||
}
|
||||
;
|
||||
|
||||
admin_namevalue_conf
|
||||
: ID '=' ID ';'
|
||||
{
|
||||
$$ = cgroup_config_group_admin_perm($1, $3);
|
||||
if (!$$) {
|
||||
fprintf(stderr, "parsing failed at line number %d\n",
|
||||
line_no);
|
||||
$$ = ECGCONFIGPARSEFAIL;
|
||||
return $$;
|
||||
}
|
||||
}
|
||||
| admin_namevalue_conf ID '=' ID ';'
|
||||
{
|
||||
$$ = $1 && cgroup_config_group_admin_perm($2, $4);
|
||||
if (!$$) {
|
||||
fprintf(stderr, "parsing failed at line number %d\n",
|
||||
line_no);
|
||||
$$ = ECGCONFIGPARSEFAIL;
|
||||
return $$;
|
||||
}
|
||||
}
|
||||
;
|
||||
|
||||
template_task_namevalue_conf
|
||||
: ID '=' ID ';'
|
||||
{
|
||||
$$ = template_config_group_task_perm($1, $3);
|
||||
if (!$$) {
|
||||
fprintf(stderr, "parsing failed at line number %d\n",
|
||||
line_no);
|
||||
$$ = ECGCONFIGPARSEFAIL;
|
||||
return $$;
|
||||
}
|
||||
}
|
||||
| template_task_namevalue_conf ID '=' ID ';'
|
||||
{
|
||||
$$ = $1 && template_config_group_task_perm($2, $4);
|
||||
if (!$$) {
|
||||
fprintf(stderr, "parsing failed at line number %d\n",
|
||||
line_no);
|
||||
$$ = ECGCONFIGPARSEFAIL;
|
||||
return $$;
|
||||
}
|
||||
}
|
||||
;
|
||||
|
||||
template_admin_namevalue_conf
|
||||
: ID '=' ID ';'
|
||||
{
|
||||
$$ = template_config_group_admin_perm($1, $3);
|
||||
if (!$$) {
|
||||
fprintf(stderr, "parsing failed at line number %d\n",
|
||||
line_no);
|
||||
$$ = ECGCONFIGPARSEFAIL;
|
||||
return $$;
|
||||
}
|
||||
}
|
||||
| template_admin_namevalue_conf ID '=' ID ';'
|
||||
{
|
||||
$$ = $1 && template_config_group_admin_perm($2, $4);
|
||||
if (!$$) {
|
||||
fprintf(stderr, "parsing failed at line number %d\n",
|
||||
line_no);
|
||||
$$ = ECGCONFIGPARSEFAIL;
|
||||
return $$;
|
||||
}
|
||||
}
|
||||
;
|
||||
|
||||
|
||||
task_or_admin
|
||||
: TASK '{' task_namevalue_conf '}' admin_conf
|
||||
{
|
||||
$$ = $3 && $5;
|
||||
if (!$$) {
|
||||
fprintf(stderr, "parsing failed at line number %d\n",
|
||||
line_no);
|
||||
$$ = ECGCONFIGPARSEFAIL;
|
||||
return $$;
|
||||
}
|
||||
}
|
||||
| ADMIN '{' admin_namevalue_conf '}' task_conf
|
||||
{
|
||||
$$ = $3 && $5;
|
||||
if (!$$) {
|
||||
fprintf(stderr, "parsing failed at line number %d\n",
|
||||
line_no);
|
||||
$$ = ECGCONFIGPARSEFAIL;
|
||||
return $$;
|
||||
}
|
||||
}
|
||||
;
|
||||
|
||||
admin_conf: ADMIN '{' admin_namevalue_conf '}'
|
||||
{
|
||||
$$ = $3;
|
||||
if (!$$) {
|
||||
fprintf(stderr, "parsing failed at line number %d\n",
|
||||
line_no);
|
||||
$$ = ECGCONFIGPARSEFAIL;
|
||||
return $$;
|
||||
}
|
||||
}
|
||||
;
|
||||
|
||||
task_conf: TASK '{' task_namevalue_conf '}'
|
||||
{
|
||||
$$ = $3;
|
||||
if (!$$) {
|
||||
fprintf(stderr, "parsing failed at line number %d\n",
|
||||
line_no);
|
||||
$$ = ECGCONFIGPARSEFAIL;
|
||||
return $$;
|
||||
}
|
||||
}
|
||||
;
|
||||
|
||||
template_admin_conf: ADMIN '{' template_admin_namevalue_conf '}'
|
||||
{
|
||||
$$ = $3;
|
||||
if (!$$) {
|
||||
fprintf(stderr, "parsing failed at line number %d\n",
|
||||
line_no);
|
||||
$$ = ECGCONFIGPARSEFAIL;
|
||||
return $$;
|
||||
}
|
||||
}
|
||||
;
|
||||
|
||||
template_task_conf: TASK '{' template_task_namevalue_conf '}'
|
||||
{
|
||||
$$ = $3;
|
||||
if (!$$) {
|
||||
fprintf(stderr, "parsing failed at line number %d\n",
|
||||
line_no);
|
||||
$$ = ECGCONFIGPARSEFAIL;
|
||||
return $$;
|
||||
}
|
||||
}
|
||||
;
|
||||
|
||||
mountvalue_conf
|
||||
: ID '=' ID ';'
|
||||
{
|
||||
if (!cgroup_config_insert_into_mount_table($1, $3)) {
|
||||
cgroup_config_cleanup_mount_table();
|
||||
$$ = ECGCONFIGPARSEFAIL;
|
||||
return $$;
|
||||
}
|
||||
$$ = 1;
|
||||
}
|
||||
| mountvalue_conf ID '=' ID ';'
|
||||
{
|
||||
if (!cgroup_config_insert_into_mount_table($2, $4)) {
|
||||
cgroup_config_cleanup_mount_table();
|
||||
$$ = ECGCONFIGPARSEFAIL;
|
||||
return $$;
|
||||
}
|
||||
$$ = 1;
|
||||
}
|
||||
;
|
||||
|
||||
mount : MOUNT '{' mountvalue_conf '}'
|
||||
{
|
||||
$$ = $3;
|
||||
if (!$$) {
|
||||
fprintf(stderr, "parsing failed at line number %d\n",
|
||||
line_no);
|
||||
$$ = ECGCONFIGPARSEFAIL;
|
||||
return $$;
|
||||
}
|
||||
}
|
||||
;
|
||||
|
||||
namespace_conf
|
||||
: ID '=' ID ';'
|
||||
{
|
||||
if (!cgroup_config_insert_into_namespace_table($1, $3)) {
|
||||
cgroup_config_cleanup_namespace_table();
|
||||
$$ = ECGCONFIGPARSEFAIL;
|
||||
return $$;
|
||||
}
|
||||
$$ = 1;
|
||||
}
|
||||
| namespace_conf ID '=' ID ';'
|
||||
{
|
||||
if (!cgroup_config_insert_into_namespace_table($2, $4)) {
|
||||
cgroup_config_cleanup_namespace_table();
|
||||
$$ = ECGCONFIGPARSEFAIL;
|
||||
return $$;
|
||||
}
|
||||
$$ = 1;
|
||||
}
|
||||
;
|
||||
|
||||
namespace : NAMESPACE '{' namespace_conf '}'
|
||||
{
|
||||
$$ = $3;
|
||||
if (!$$) {
|
||||
fprintf(stderr, "parsing failed at line number %d\n",
|
||||
line_no);
|
||||
$$ = ECGCONFIGPARSEFAIL;
|
||||
return $$;
|
||||
}
|
||||
}
|
||||
;
|
||||
|
||||
%%
|
36
libcgroup-0.41/src/tools/Makefile.am
Normal file
36
libcgroup-0.41/src/tools/Makefile.am
Normal file
@ -0,0 +1,36 @@
|
||||
INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/include
|
||||
LDADD = $(top_builddir)/src/.libs/libcgroup.la
|
||||
|
||||
if WITH_TOOLS
|
||||
|
||||
bin_PROGRAMS = cgexec cgclassify cgcreate cgset cgget cgdelete lssubsys\
|
||||
lscgroup cgsnapshot
|
||||
|
||||
sbin_PROGRAMS = cgconfigparser cgclear
|
||||
|
||||
cgexec_SOURCES = cgexec.c tools-common.c tools-common.h
|
||||
|
||||
cgclassify_SOURCES = cgclassify.c tools-common.c tools-common.h
|
||||
|
||||
cgcreate_SOURCES = cgcreate.c tools-common.c tools-common.h
|
||||
|
||||
cgset_SOURCES = cgset.c tools-common.c tools-common.h
|
||||
|
||||
cgget_SOURCES = cgget.c tools-common.c tools-common.h
|
||||
|
||||
cgconfigparser_SOURCES = cgconfig.c tools-common.c tools-common.h
|
||||
|
||||
cgclear_SOURCES = cgclear.c tools-common.c tools-common.h
|
||||
|
||||
cgdelete_SOURCES = cgdelete.c tools-common.c tools-common.h
|
||||
|
||||
lssubsys_SOURCES = lssubsys.c
|
||||
|
||||
lscgroup_SOURCES = tools-common.c lscgroup.c
|
||||
|
||||
cgsnapshot_SOURCES = cgsnapshot.c
|
||||
|
||||
install-exec-hook:
|
||||
chmod u+s $(DESTDIR)$(bindir)/cgexec
|
||||
|
||||
endif
|
822
libcgroup-0.41/src/tools/Makefile.in
Normal file
822
libcgroup-0.41/src/tools/Makefile.in
Normal file
@ -0,0 +1,822 @@
|
||||
# Makefile.in generated by automake 1.13.4 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
VPATH = @srcdir@
|
||||
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
@WITH_TOOLS_TRUE@bin_PROGRAMS = cgexec$(EXEEXT) cgclassify$(EXEEXT) \
|
||||
@WITH_TOOLS_TRUE@ cgcreate$(EXEEXT) cgset$(EXEEXT) \
|
||||
@WITH_TOOLS_TRUE@ cgget$(EXEEXT) cgdelete$(EXEEXT) \
|
||||
@WITH_TOOLS_TRUE@ lssubsys$(EXEEXT) lscgroup$(EXEEXT) \
|
||||
@WITH_TOOLS_TRUE@ cgsnapshot$(EXEEXT)
|
||||
@WITH_TOOLS_TRUE@sbin_PROGRAMS = cgconfigparser$(EXEEXT) \
|
||||
@WITH_TOOLS_TRUE@ cgclear$(EXEEXT)
|
||||
subdir = src/tools
|
||||
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
|
||||
$(top_srcdir)/depcomp
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)"
|
||||
PROGRAMS = $(bin_PROGRAMS) $(sbin_PROGRAMS)
|
||||
am__cgclassify_SOURCES_DIST = cgclassify.c tools-common.c \
|
||||
tools-common.h
|
||||
@WITH_TOOLS_TRUE@am_cgclassify_OBJECTS = cgclassify.$(OBJEXT) \
|
||||
@WITH_TOOLS_TRUE@ tools-common.$(OBJEXT)
|
||||
cgclassify_OBJECTS = $(am_cgclassify_OBJECTS)
|
||||
cgclassify_LDADD = $(LDADD)
|
||||
cgclassify_DEPENDENCIES = $(top_builddir)/src/.libs/libcgroup.la
|
||||
AM_V_lt = $(am__v_lt_@AM_V@)
|
||||
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
|
||||
am__v_lt_0 = --silent
|
||||
am__v_lt_1 =
|
||||
am__cgclear_SOURCES_DIST = cgclear.c tools-common.c tools-common.h
|
||||
@WITH_TOOLS_TRUE@am_cgclear_OBJECTS = cgclear.$(OBJEXT) \
|
||||
@WITH_TOOLS_TRUE@ tools-common.$(OBJEXT)
|
||||
cgclear_OBJECTS = $(am_cgclear_OBJECTS)
|
||||
cgclear_LDADD = $(LDADD)
|
||||
cgclear_DEPENDENCIES = $(top_builddir)/src/.libs/libcgroup.la
|
||||
am__cgconfigparser_SOURCES_DIST = cgconfig.c tools-common.c \
|
||||
tools-common.h
|
||||
@WITH_TOOLS_TRUE@am_cgconfigparser_OBJECTS = cgconfig.$(OBJEXT) \
|
||||
@WITH_TOOLS_TRUE@ tools-common.$(OBJEXT)
|
||||
cgconfigparser_OBJECTS = $(am_cgconfigparser_OBJECTS)
|
||||
cgconfigparser_LDADD = $(LDADD)
|
||||
cgconfigparser_DEPENDENCIES = $(top_builddir)/src/.libs/libcgroup.la
|
||||
am__cgcreate_SOURCES_DIST = cgcreate.c tools-common.c tools-common.h
|
||||
@WITH_TOOLS_TRUE@am_cgcreate_OBJECTS = cgcreate.$(OBJEXT) \
|
||||
@WITH_TOOLS_TRUE@ tools-common.$(OBJEXT)
|
||||
cgcreate_OBJECTS = $(am_cgcreate_OBJECTS)
|
||||
cgcreate_LDADD = $(LDADD)
|
||||
cgcreate_DEPENDENCIES = $(top_builddir)/src/.libs/libcgroup.la
|
||||
am__cgdelete_SOURCES_DIST = cgdelete.c tools-common.c tools-common.h
|
||||
@WITH_TOOLS_TRUE@am_cgdelete_OBJECTS = cgdelete.$(OBJEXT) \
|
||||
@WITH_TOOLS_TRUE@ tools-common.$(OBJEXT)
|
||||
cgdelete_OBJECTS = $(am_cgdelete_OBJECTS)
|
||||
cgdelete_LDADD = $(LDADD)
|
||||
cgdelete_DEPENDENCIES = $(top_builddir)/src/.libs/libcgroup.la
|
||||
am__cgexec_SOURCES_DIST = cgexec.c tools-common.c tools-common.h
|
||||
@WITH_TOOLS_TRUE@am_cgexec_OBJECTS = cgexec.$(OBJEXT) \
|
||||
@WITH_TOOLS_TRUE@ tools-common.$(OBJEXT)
|
||||
cgexec_OBJECTS = $(am_cgexec_OBJECTS)
|
||||
cgexec_LDADD = $(LDADD)
|
||||
cgexec_DEPENDENCIES = $(top_builddir)/src/.libs/libcgroup.la
|
||||
am__cgget_SOURCES_DIST = cgget.c tools-common.c tools-common.h
|
||||
@WITH_TOOLS_TRUE@am_cgget_OBJECTS = cgget.$(OBJEXT) \
|
||||
@WITH_TOOLS_TRUE@ tools-common.$(OBJEXT)
|
||||
cgget_OBJECTS = $(am_cgget_OBJECTS)
|
||||
cgget_LDADD = $(LDADD)
|
||||
cgget_DEPENDENCIES = $(top_builddir)/src/.libs/libcgroup.la
|
||||
am__cgset_SOURCES_DIST = cgset.c tools-common.c tools-common.h
|
||||
@WITH_TOOLS_TRUE@am_cgset_OBJECTS = cgset.$(OBJEXT) \
|
||||
@WITH_TOOLS_TRUE@ tools-common.$(OBJEXT)
|
||||
cgset_OBJECTS = $(am_cgset_OBJECTS)
|
||||
cgset_LDADD = $(LDADD)
|
||||
cgset_DEPENDENCIES = $(top_builddir)/src/.libs/libcgroup.la
|
||||
am__cgsnapshot_SOURCES_DIST = cgsnapshot.c
|
||||
@WITH_TOOLS_TRUE@am_cgsnapshot_OBJECTS = cgsnapshot.$(OBJEXT)
|
||||
cgsnapshot_OBJECTS = $(am_cgsnapshot_OBJECTS)
|
||||
cgsnapshot_LDADD = $(LDADD)
|
||||
cgsnapshot_DEPENDENCIES = $(top_builddir)/src/.libs/libcgroup.la
|
||||
am__lscgroup_SOURCES_DIST = tools-common.c lscgroup.c
|
||||
@WITH_TOOLS_TRUE@am_lscgroup_OBJECTS = tools-common.$(OBJEXT) \
|
||||
@WITH_TOOLS_TRUE@ lscgroup.$(OBJEXT)
|
||||
lscgroup_OBJECTS = $(am_lscgroup_OBJECTS)
|
||||
lscgroup_LDADD = $(LDADD)
|
||||
lscgroup_DEPENDENCIES = $(top_builddir)/src/.libs/libcgroup.la
|
||||
am__lssubsys_SOURCES_DIST = lssubsys.c
|
||||
@WITH_TOOLS_TRUE@am_lssubsys_OBJECTS = lssubsys.$(OBJEXT)
|
||||
lssubsys_OBJECTS = $(am_lssubsys_OBJECTS)
|
||||
lssubsys_LDADD = $(LDADD)
|
||||
lssubsys_DEPENDENCIES = $(top_builddir)/src/.libs/libcgroup.la
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
am__mv = mv -f
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
AM_V_CC = $(am__v_CC_@AM_V@)
|
||||
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
|
||||
am__v_CC_0 = @echo " CC " $@;
|
||||
am__v_CC_1 =
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
|
||||
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
|
||||
am__v_CCLD_0 = @echo " CCLD " $@;
|
||||
am__v_CCLD_1 =
|
||||
SOURCES = $(cgclassify_SOURCES) $(cgclear_SOURCES) \
|
||||
$(cgconfigparser_SOURCES) $(cgcreate_SOURCES) \
|
||||
$(cgdelete_SOURCES) $(cgexec_SOURCES) $(cgget_SOURCES) \
|
||||
$(cgset_SOURCES) $(cgsnapshot_SOURCES) $(lscgroup_SOURCES) \
|
||||
$(lssubsys_SOURCES)
|
||||
DIST_SOURCES = $(am__cgclassify_SOURCES_DIST) \
|
||||
$(am__cgclear_SOURCES_DIST) $(am__cgconfigparser_SOURCES_DIST) \
|
||||
$(am__cgcreate_SOURCES_DIST) $(am__cgdelete_SOURCES_DIST) \
|
||||
$(am__cgexec_SOURCES_DIST) $(am__cgget_SOURCES_DIST) \
|
||||
$(am__cgset_SOURCES_DIST) $(am__cgsnapshot_SOURCES_DIST) \
|
||||
$(am__lscgroup_SOURCES_DIST) $(am__lssubsys_SOURCES_DIST)
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
# Read a list of newline-separated strings from the standard input,
|
||||
# and print each of them once, without duplicates. Input order is
|
||||
# *not* preserved.
|
||||
am__uniquify_input = $(AWK) '\
|
||||
BEGIN { nonempty = 0; } \
|
||||
{ items[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in items) print i; }; } \
|
||||
'
|
||||
# Make sure the list of sources is unique. This is necessary because,
|
||||
# e.g., the same source file might be shared among _SOURCES variables
|
||||
# for different programs/libraries.
|
||||
am__define_uniq_tagged_files = \
|
||||
list='$(am__tagged_files)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | $(am__uniquify_input)`
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
FGREP = @FGREP@
|
||||
GREP = @GREP@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LEX = @LEX@
|
||||
LEXLIB = @LEXLIB@
|
||||
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBRARY_VERSION_MAJOR = @LIBRARY_VERSION_MAJOR@
|
||||
LIBRARY_VERSION_MINOR = @LIBRARY_VERSION_MINOR@
|
||||
LIBRARY_VERSION_RELEASE = @LIBRARY_VERSION_RELEASE@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
REALLY_YACC = @REALLY_YACC@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
YACC = @YACC@
|
||||
YFLAGS = @YFLAGS@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pamlibdir = @pamlibdir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/include
|
||||
LDADD = $(top_builddir)/src/.libs/libcgroup.la
|
||||
@WITH_TOOLS_TRUE@cgexec_SOURCES = cgexec.c tools-common.c tools-common.h
|
||||
@WITH_TOOLS_TRUE@cgclassify_SOURCES = cgclassify.c tools-common.c tools-common.h
|
||||
@WITH_TOOLS_TRUE@cgcreate_SOURCES = cgcreate.c tools-common.c tools-common.h
|
||||
@WITH_TOOLS_TRUE@cgset_SOURCES = cgset.c tools-common.c tools-common.h
|
||||
@WITH_TOOLS_TRUE@cgget_SOURCES = cgget.c tools-common.c tools-common.h
|
||||
@WITH_TOOLS_TRUE@cgconfigparser_SOURCES = cgconfig.c tools-common.c tools-common.h
|
||||
@WITH_TOOLS_TRUE@cgclear_SOURCES = cgclear.c tools-common.c tools-common.h
|
||||
@WITH_TOOLS_TRUE@cgdelete_SOURCES = cgdelete.c tools-common.c tools-common.h
|
||||
@WITH_TOOLS_TRUE@lssubsys_SOURCES = lssubsys.c
|
||||
@WITH_TOOLS_TRUE@lscgroup_SOURCES = tools-common.c lscgroup.c
|
||||
@WITH_TOOLS_TRUE@cgsnapshot_SOURCES = cgsnapshot.c
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .lo .o .obj
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/tools/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign src/tools/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
install-binPROGRAMS: $(bin_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
|
||||
if test -n "$$list"; then \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
|
||||
fi; \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed 's/$(EXEEXT)$$//' | \
|
||||
while read p p1; do if test -f $$p \
|
||||
|| test -f $$p1 \
|
||||
; then echo "$$p"; echo "$$p"; else :; fi; \
|
||||
done | \
|
||||
sed -e 'p;s,.*/,,;n;h' \
|
||||
-e 's|.*|.|' \
|
||||
-e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
|
||||
sed 'N;N;N;s,\n, ,g' | \
|
||||
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
|
||||
{ d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
|
||||
if ($$2 == $$4) files[d] = files[d] " " $$1; \
|
||||
else { print "f", $$3 "/" $$4, $$1; } } \
|
||||
END { for (d in files) print "f", d, files[d] }' | \
|
||||
while read type dir files; do \
|
||||
if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
|
||||
test -z "$$files" || { \
|
||||
echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
|
||||
$(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
|
||||
} \
|
||||
; done
|
||||
|
||||
uninstall-binPROGRAMS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
|
||||
files=`for p in $$list; do echo "$$p"; done | \
|
||||
sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
|
||||
-e 's/$$/$(EXEEXT)/' \
|
||||
`; \
|
||||
test -n "$$list" || exit 0; \
|
||||
echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
|
||||
cd "$(DESTDIR)$(bindir)" && rm -f $$files
|
||||
|
||||
clean-binPROGRAMS:
|
||||
@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
|
||||
echo " rm -f" $$list; \
|
||||
rm -f $$list || exit $$?; \
|
||||
test -n "$(EXEEXT)" || exit 0; \
|
||||
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
|
||||
echo " rm -f" $$list; \
|
||||
rm -f $$list
|
||||
install-sbinPROGRAMS: $(sbin_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
|
||||
if test -n "$$list"; then \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \
|
||||
fi; \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed 's/$(EXEEXT)$$//' | \
|
||||
while read p p1; do if test -f $$p \
|
||||
|| test -f $$p1 \
|
||||
; then echo "$$p"; echo "$$p"; else :; fi; \
|
||||
done | \
|
||||
sed -e 'p;s,.*/,,;n;h' \
|
||||
-e 's|.*|.|' \
|
||||
-e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
|
||||
sed 'N;N;N;s,\n, ,g' | \
|
||||
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
|
||||
{ d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
|
||||
if ($$2 == $$4) files[d] = files[d] " " $$1; \
|
||||
else { print "f", $$3 "/" $$4, $$1; } } \
|
||||
END { for (d in files) print "f", d, files[d] }' | \
|
||||
while read type dir files; do \
|
||||
if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
|
||||
test -z "$$files" || { \
|
||||
echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \
|
||||
$(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \
|
||||
} \
|
||||
; done
|
||||
|
||||
uninstall-sbinPROGRAMS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
|
||||
files=`for p in $$list; do echo "$$p"; done | \
|
||||
sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
|
||||
-e 's/$$/$(EXEEXT)/' \
|
||||
`; \
|
||||
test -n "$$list" || exit 0; \
|
||||
echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
|
||||
cd "$(DESTDIR)$(sbindir)" && rm -f $$files
|
||||
|
||||
clean-sbinPROGRAMS:
|
||||
@list='$(sbin_PROGRAMS)'; test -n "$$list" || exit 0; \
|
||||
echo " rm -f" $$list; \
|
||||
rm -f $$list || exit $$?; \
|
||||
test -n "$(EXEEXT)" || exit 0; \
|
||||
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
|
||||
echo " rm -f" $$list; \
|
||||
rm -f $$list
|
||||
|
||||
cgclassify$(EXEEXT): $(cgclassify_OBJECTS) $(cgclassify_DEPENDENCIES) $(EXTRA_cgclassify_DEPENDENCIES)
|
||||
@rm -f cgclassify$(EXEEXT)
|
||||
$(AM_V_CCLD)$(LINK) $(cgclassify_OBJECTS) $(cgclassify_LDADD) $(LIBS)
|
||||
|
||||
cgclear$(EXEEXT): $(cgclear_OBJECTS) $(cgclear_DEPENDENCIES) $(EXTRA_cgclear_DEPENDENCIES)
|
||||
@rm -f cgclear$(EXEEXT)
|
||||
$(AM_V_CCLD)$(LINK) $(cgclear_OBJECTS) $(cgclear_LDADD) $(LIBS)
|
||||
|
||||
cgconfigparser$(EXEEXT): $(cgconfigparser_OBJECTS) $(cgconfigparser_DEPENDENCIES) $(EXTRA_cgconfigparser_DEPENDENCIES)
|
||||
@rm -f cgconfigparser$(EXEEXT)
|
||||
$(AM_V_CCLD)$(LINK) $(cgconfigparser_OBJECTS) $(cgconfigparser_LDADD) $(LIBS)
|
||||
|
||||
cgcreate$(EXEEXT): $(cgcreate_OBJECTS) $(cgcreate_DEPENDENCIES) $(EXTRA_cgcreate_DEPENDENCIES)
|
||||
@rm -f cgcreate$(EXEEXT)
|
||||
$(AM_V_CCLD)$(LINK) $(cgcreate_OBJECTS) $(cgcreate_LDADD) $(LIBS)
|
||||
|
||||
cgdelete$(EXEEXT): $(cgdelete_OBJECTS) $(cgdelete_DEPENDENCIES) $(EXTRA_cgdelete_DEPENDENCIES)
|
||||
@rm -f cgdelete$(EXEEXT)
|
||||
$(AM_V_CCLD)$(LINK) $(cgdelete_OBJECTS) $(cgdelete_LDADD) $(LIBS)
|
||||
|
||||
cgexec$(EXEEXT): $(cgexec_OBJECTS) $(cgexec_DEPENDENCIES) $(EXTRA_cgexec_DEPENDENCIES)
|
||||
@rm -f cgexec$(EXEEXT)
|
||||
$(AM_V_CCLD)$(LINK) $(cgexec_OBJECTS) $(cgexec_LDADD) $(LIBS)
|
||||
|
||||
cgget$(EXEEXT): $(cgget_OBJECTS) $(cgget_DEPENDENCIES) $(EXTRA_cgget_DEPENDENCIES)
|
||||
@rm -f cgget$(EXEEXT)
|
||||
$(AM_V_CCLD)$(LINK) $(cgget_OBJECTS) $(cgget_LDADD) $(LIBS)
|
||||
|
||||
cgset$(EXEEXT): $(cgset_OBJECTS) $(cgset_DEPENDENCIES) $(EXTRA_cgset_DEPENDENCIES)
|
||||
@rm -f cgset$(EXEEXT)
|
||||
$(AM_V_CCLD)$(LINK) $(cgset_OBJECTS) $(cgset_LDADD) $(LIBS)
|
||||
|
||||
cgsnapshot$(EXEEXT): $(cgsnapshot_OBJECTS) $(cgsnapshot_DEPENDENCIES) $(EXTRA_cgsnapshot_DEPENDENCIES)
|
||||
@rm -f cgsnapshot$(EXEEXT)
|
||||
$(AM_V_CCLD)$(LINK) $(cgsnapshot_OBJECTS) $(cgsnapshot_LDADD) $(LIBS)
|
||||
|
||||
lscgroup$(EXEEXT): $(lscgroup_OBJECTS) $(lscgroup_DEPENDENCIES) $(EXTRA_lscgroup_DEPENDENCIES)
|
||||
@rm -f lscgroup$(EXEEXT)
|
||||
$(AM_V_CCLD)$(LINK) $(lscgroup_OBJECTS) $(lscgroup_LDADD) $(LIBS)
|
||||
|
||||
lssubsys$(EXEEXT): $(lssubsys_OBJECTS) $(lssubsys_DEPENDENCIES) $(EXTRA_lssubsys_DEPENDENCIES)
|
||||
@rm -f lssubsys$(EXEEXT)
|
||||
$(AM_V_CCLD)$(LINK) $(lssubsys_OBJECTS) $(lssubsys_LDADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cgclassify.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cgclear.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cgconfig.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cgcreate.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cgdelete.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cgexec.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cgget.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cgset.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cgsnapshot.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lscgroup.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lssubsys.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tools-common.Po@am__quote@
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
ID: $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); mkid -fID $$unique
|
||||
tags: tags-am
|
||||
TAGS: tags
|
||||
|
||||
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
$(am__define_uniq_tagged_files); \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: ctags-am
|
||||
|
||||
CTAGS: ctags
|
||||
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
cscopelist: cscopelist-am
|
||||
|
||||
cscopelist-am: $(am__tagged_files)
|
||||
list='$(am__tagged_files)'; \
|
||||
case "$(srcdir)" in \
|
||||
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
||||
*) sdir=$(subdir)/$(srcdir) ;; \
|
||||
esac; \
|
||||
for i in $$list; do \
|
||||
if test -f "$$i"; then \
|
||||
echo "$(subdir)/$$i"; \
|
||||
else \
|
||||
echo "$$sdir/$$i"; \
|
||||
fi; \
|
||||
done >> $(top_builddir)/cscope.files
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(PROGRAMS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
@WITH_TOOLS_FALSE@install-exec-hook:
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-binPROGRAMS clean-generic clean-libtool \
|
||||
clean-sbinPROGRAMS mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am: install-binPROGRAMS install-sbinPROGRAMS
|
||||
@$(NORMAL_INSTALL)
|
||||
$(MAKE) $(AM_MAKEFLAGS) install-exec-hook
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-binPROGRAMS uninstall-sbinPROGRAMS
|
||||
|
||||
.MAKE: install-am install-exec-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \
|
||||
clean-binPROGRAMS clean-generic clean-libtool \
|
||||
clean-sbinPROGRAMS cscopelist-am ctags ctags-am distclean \
|
||||
distclean-compile distclean-generic distclean-libtool \
|
||||
distclean-tags distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-binPROGRAMS install-data \
|
||||
install-data-am install-dvi install-dvi-am install-exec \
|
||||
install-exec-am install-exec-hook install-html install-html-am \
|
||||
install-info install-info-am install-man install-pdf \
|
||||
install-pdf-am install-ps install-ps-am install-sbinPROGRAMS \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
|
||||
pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
|
||||
uninstall-binPROGRAMS uninstall-sbinPROGRAMS
|
||||
|
||||
|
||||
@WITH_TOOLS_TRUE@install-exec-hook:
|
||||
@WITH_TOOLS_TRUE@ chmod u+s $(DESTDIR)$(bindir)/cgexec
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
203
libcgroup-0.41/src/tools/cgclassify.c
Normal file
203
libcgroup-0.41/src/tools/cgclassify.c
Normal file
@ -0,0 +1,203 @@
|
||||
/*
|
||||
* Copyright RedHat Inc. 2008
|
||||
*
|
||||
* Authors: Vivek Goyal <vgoyal@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2.1 of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it would be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <libcgroup.h>
|
||||
#include <libcgroup-internal.h>
|
||||
#include <limits.h>
|
||||
#include <pwd.h>
|
||||
#include <unistd.h>
|
||||
#include <getopt.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "tools-common.h"
|
||||
|
||||
#define TEMP_BUF 81
|
||||
|
||||
static void usage(int status, const char *program_name)
|
||||
{
|
||||
if (status != 0) {
|
||||
fprintf(stderr, "Wrong input parameters,"
|
||||
" try %s -h' for more information.\n",
|
||||
program_name);
|
||||
return;
|
||||
}
|
||||
printf("Usage: %s [[-g] <controllers>:<path>] "\
|
||||
"[--sticky | --cancel-sticky] <list of pids>\n", program_name);
|
||||
printf("Move running task(s) to given cgroups\n");
|
||||
printf(" -h, --help Display this help\n");
|
||||
printf(" -g <controllers>:<path> Control group to be used "\
|
||||
"as target\n");
|
||||
printf(" --cancel-sticky cgred daemon change pidlist "\
|
||||
"and children tasks\n");
|
||||
printf(" --sticky cgred daemon does not change "\
|
||||
"pidlist and children tasks\n");
|
||||
}
|
||||
|
||||
/*
|
||||
* Change process group as specified on command line.
|
||||
*/
|
||||
static int change_group_path(pid_t pid, struct cgroup_group_spec *cgroup_list[])
|
||||
{
|
||||
int i;
|
||||
int ret = 0;
|
||||
|
||||
for (i = 0; i < CG_HIER_MAX; i++) {
|
||||
if (!cgroup_list[i])
|
||||
break;
|
||||
|
||||
ret = cgroup_change_cgroup_path(cgroup_list[i]->path, pid,
|
||||
(const char*const*) cgroup_list[i]->controllers);
|
||||
if (ret) {
|
||||
fprintf(stderr, "Error changing group of pid %d: %s\n",
|
||||
pid, cgroup_strerror(ret));
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Change process group as specified in cgrules.conf.
|
||||
*/
|
||||
static int change_group_based_on_rule(pid_t pid)
|
||||
{
|
||||
uid_t euid;
|
||||
gid_t egid;
|
||||
char *procname = NULL;
|
||||
int ret = -1;
|
||||
|
||||
/* Put pid into right cgroup as per rules in /etc/cgrules.conf */
|
||||
if (cgroup_get_uid_gid_from_procfs(pid, &euid, &egid)) {
|
||||
fprintf(stderr, "Error in determining euid/egid of"
|
||||
" pid %d\n", pid);
|
||||
goto out;
|
||||
}
|
||||
ret = cgroup_get_procname_from_procfs(pid, &procname);
|
||||
if (ret) {
|
||||
fprintf(stderr, "Error in determining process name of"
|
||||
" pid %d\n", pid);
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* Change the cgroup by determining the rules */
|
||||
ret = cgroup_change_cgroup_flags(euid, egid, procname, pid, 0);
|
||||
if (ret) {
|
||||
fprintf(stderr, "Error: change of cgroup failed for"
|
||||
" pid %d: %s\n", pid, cgroup_strerror(ret));
|
||||
goto out;
|
||||
}
|
||||
ret = 0;
|
||||
out:
|
||||
if (procname)
|
||||
free(procname);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static struct option longopts[] = {
|
||||
{"sticky", no_argument, NULL, 's'},
|
||||
{"cancel-sticky", no_argument, NULL, 'u'},
|
||||
{"help", no_argument, NULL, 'h'},
|
||||
{0, 0, 0, 0}
|
||||
};
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int ret = 0, i, exit_code = 0;
|
||||
pid_t pid;
|
||||
int cg_specified = 0;
|
||||
int flag = 0;
|
||||
struct cgroup_group_spec *cgroup_list[CG_HIER_MAX];
|
||||
int c;
|
||||
char *endptr;
|
||||
|
||||
|
||||
if (argc < 2) {
|
||||
usage(1, argv[0]);
|
||||
exit(2);
|
||||
}
|
||||
|
||||
memset(cgroup_list, 0, sizeof(cgroup_list));
|
||||
while ((c = getopt_long(argc, argv, "+g:sh", longopts, NULL)) > 0) {
|
||||
switch (c) {
|
||||
case 'h':
|
||||
usage(0, argv[0]);
|
||||
exit(0);
|
||||
break;
|
||||
case 'g':
|
||||
ret = parse_cgroup_spec(cgroup_list, optarg,
|
||||
CG_HIER_MAX);
|
||||
if (ret) {
|
||||
fprintf(stderr, "cgroup controller and path"
|
||||
"parsing failed\n");
|
||||
return -1;
|
||||
}
|
||||
cg_specified = 1;
|
||||
break;
|
||||
case 's':
|
||||
flag |= CGROUP_DAEMON_UNCHANGE_CHILDREN;
|
||||
break;
|
||||
case 'u':
|
||||
flag |= CGROUP_DAEMON_CANCEL_UNCHANGE_PROCESS;
|
||||
break;
|
||||
default:
|
||||
usage(1, argv[0]);
|
||||
exit(2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Initialize libcg */
|
||||
ret = cgroup_init();
|
||||
if (ret) {
|
||||
fprintf(stderr, "%s: libcgroup initialization failed: %s\n",
|
||||
argv[0], cgroup_strerror(ret));
|
||||
return ret;
|
||||
}
|
||||
|
||||
for (i = optind; i < argc; i++) {
|
||||
pid = (pid_t) strtol(argv[i], &endptr, 10);
|
||||
if (endptr[0] != '\0') {
|
||||
/* the input argument was not a number */
|
||||
fprintf(stderr, "Error: %s is not valid pid.\n",
|
||||
argv[i]);
|
||||
exit_code = 2;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (flag)
|
||||
ret = cgroup_register_unchanged_process(pid, flag);
|
||||
if (ret)
|
||||
exit_code = 1;
|
||||
|
||||
if (cg_specified)
|
||||
ret = change_group_path(pid, cgroup_list);
|
||||
else
|
||||
ret = change_group_based_on_rule(pid);
|
||||
|
||||
/* if any group change fails */
|
||||
if (ret)
|
||||
exit_code = 1;
|
||||
}
|
||||
return exit_code;
|
||||
|
||||
}
|
142
libcgroup-0.41/src/tools/cgclear.c
Normal file
142
libcgroup-0.41/src/tools/cgclear.c
Normal file
@ -0,0 +1,142 @@
|
||||
/*
|
||||
* Copyright IBM Corporation. 2009
|
||||
*
|
||||
* Authors: Dhaval Giani <dhaval@linux.vnet.ibm.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2.1 of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it would be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* Code initiated and designed by Dhaval Giani. All faults are most likely
|
||||
* his mistake.
|
||||
*/
|
||||
|
||||
#include <libcgroup.h>
|
||||
#include <libcgroup-internal.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <getopt.h>
|
||||
#include "tools-common.h"
|
||||
|
||||
static struct cgroup_string_list cfg_files;
|
||||
|
||||
static void usage(int status, const char *program_name)
|
||||
{
|
||||
if (status != 0) {
|
||||
fprintf(stderr, "Wrong input parameters,"
|
||||
" try %s -h' for more information.\n",
|
||||
program_name);
|
||||
return;
|
||||
}
|
||||
printf("Usage: %s [-h] [-l FILE] [-L DIR] [-e]\n",
|
||||
program_name);
|
||||
printf("Unload the cgroup filesystem\n");
|
||||
printf(" -e, --empty Remove only empty cgroups\n");
|
||||
printf(" -h, --help Display this help\n");
|
||||
printf(" -l, --load=FILE Parse and load the cgroups "\
|
||||
"configuration file\n");
|
||||
printf(" -L, --load-directory=DIR Parse and load the cgroups "\
|
||||
"configuration files from a directory\n");
|
||||
}
|
||||
|
||||
static void report_error(int error, const char *program_name)
|
||||
{
|
||||
/* Don't spit an error when there is nothing to clear. */
|
||||
if (error == ECGROUPNOTMOUNTED)
|
||||
error = 0;
|
||||
if (error) {
|
||||
printf("%s failed with %s\n", program_name,
|
||||
cgroup_strerror(error));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int error = 0, ret;
|
||||
int c;
|
||||
int unload_all = 1;
|
||||
int flags = CGFLAG_DELETE_RECURSIVE;
|
||||
|
||||
struct option longopts[] = {
|
||||
{"load", required_argument, 0, 'l' },
|
||||
{"load-directory", required_argument, 0, 'L' },
|
||||
{"only-empty", no_argument, 0, 'e' },
|
||||
{"help", no_argument, 0, 'h'},
|
||||
{ 0, 0, 0, 0}
|
||||
};
|
||||
|
||||
ret = cgroup_string_list_init(&cfg_files, argc/2);
|
||||
if (ret) {
|
||||
fprintf(stderr, "%s: cannot initialize list of files,"
|
||||
" out of memory?\n",
|
||||
argv[0]);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
while ((c = getopt_long(argc, argv, "hl:L:e", longopts, NULL)) > 0) {
|
||||
switch (c) {
|
||||
case 'e':
|
||||
flags = CGFLAG_DELETE_EMPTY_ONLY;
|
||||
break;
|
||||
|
||||
case 'l':
|
||||
unload_all = 0;
|
||||
ret = cgroup_string_list_add_item(&cfg_files, optarg);
|
||||
if (ret) {
|
||||
fprintf(stderr, "%s: cannot add file to list,"\
|
||||
" out of memory?\n", argv[0]);
|
||||
exit(1);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'L':
|
||||
unload_all = 0;
|
||||
cgroup_string_list_add_directory(&cfg_files, optarg,
|
||||
argv[0]);
|
||||
break;
|
||||
|
||||
case 'h':
|
||||
usage(0, argv[0]);
|
||||
exit(0);
|
||||
default:
|
||||
usage(1, argv[0]);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
if (unload_all) {
|
||||
error = cgroup_unload_cgroups();
|
||||
if (error)
|
||||
report_error(error, argv[0]);
|
||||
} else {
|
||||
int i;
|
||||
|
||||
ret = cgroup_init();
|
||||
if (ret) {
|
||||
report_error(ret, argv[0]);
|
||||
exit(4);
|
||||
}
|
||||
/* process the config files in reverse order */
|
||||
for (i = cfg_files.count-1; i >= 0 ; i--) {
|
||||
ret = cgroup_config_unload_config(cfg_files.items[i],
|
||||
flags);
|
||||
if (ret && ret != ECGNONEMPTY) {
|
||||
report_error(ret, argv[0]);
|
||||
if (!error)
|
||||
error = ret;
|
||||
}
|
||||
}
|
||||
}
|
||||
cgroup_string_list_free(&cfg_files);
|
||||
if (error)
|
||||
exit(3);
|
||||
|
||||
return 0;
|
||||
}
|
206
libcgroup-0.41/src/tools/cgconfig.c
Normal file
206
libcgroup-0.41/src/tools/cgconfig.c
Normal file
@ -0,0 +1,206 @@
|
||||
|
||||
/*
|
||||
* Copyright IBM Corporation. 2007
|
||||
*
|
||||
* Authors: Dhaval Giani <dhaval@linux.vnet.ibm.com>
|
||||
* Balbir Singh <balbir@linux.vnet.ibm.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2.1 of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it would be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* Code initiated and designed by Dhaval Giani. All faults are most likely
|
||||
* his mistake.
|
||||
*/
|
||||
|
||||
#include <libcgroup.h>
|
||||
#include <libcgroup-internal.h>
|
||||
|
||||
/* For basename() */
|
||||
#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
#include <string.h>
|
||||
#include <libgen.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include <getopt.h>
|
||||
#include "tools-common.h"
|
||||
|
||||
static struct cgroup_string_list cfg_files;
|
||||
|
||||
static void usage(int status, char *progname)
|
||||
{
|
||||
if (status != 0) {
|
||||
fprintf(stderr, "Wrong input parameters, "\
|
||||
"try %s -h' for more information.\n", progname);
|
||||
return;
|
||||
}
|
||||
printf("Usage: %s [-h] [-f mode] [-d mode] [-s mode] "\
|
||||
"[-t <tuid>:<tgid>] [-a <agid>:<auid>] [-l FILE] "\
|
||||
"[-L DIR] ...\n", progname);
|
||||
printf("Parse and load the specified cgroups configuration file\n");
|
||||
printf(" -a <tuid>:<tgid> Default owner of groups files "\
|
||||
"and directories\n");
|
||||
printf(" -d, --dperm=mode Default group directory "\
|
||||
"permissions\n");
|
||||
printf(" -f, --fperm=mode Default group file "\
|
||||
"permissions\n");
|
||||
printf(" -h, --help Display this help\n");
|
||||
printf(" -l, --load=FILE Parse and load the cgroups "\
|
||||
"configuration file\n");
|
||||
printf(" -L, --load-directory=DIR Parse and load the cgroups "\
|
||||
"configuration files from a directory\n");
|
||||
printf(" -s, --tperm=mode Default tasks file "\
|
||||
"permissions\n");
|
||||
printf(" -t <tuid>:<tgid> Default owner of the tasks "\
|
||||
"file\n");
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int c, i;
|
||||
int ret, error = 0;
|
||||
static struct option options[] = {
|
||||
{"help", 0, 0, 'h'},
|
||||
{"load", 1, 0, 'l'},
|
||||
{"load-directory", 1, 0, 'L'},
|
||||
{"task", required_argument, NULL, 't'},
|
||||
{"admin", required_argument, NULL, 'a'},
|
||||
{"dperm", required_argument, NULL, 'd'},
|
||||
{"fperm", required_argument, NULL, 'f' },
|
||||
{"tperm", required_argument, NULL, 's' },
|
||||
{0, 0, 0, 0}
|
||||
};
|
||||
uid_t tuid = NO_UID_GID, auid = NO_UID_GID;
|
||||
gid_t tgid = NO_UID_GID, agid = NO_UID_GID;
|
||||
mode_t dir_mode = NO_PERMS;
|
||||
mode_t file_mode = NO_PERMS;
|
||||
mode_t tasks_mode = NO_PERMS;
|
||||
int dirm_change = 0;
|
||||
int filem_change = 0;
|
||||
struct cgroup *default_group = NULL;
|
||||
|
||||
cgroup_set_default_logger(-1);
|
||||
|
||||
if (argc < 2) {
|
||||
usage(1, argv[0]);
|
||||
return -1;
|
||||
}
|
||||
|
||||
error = cgroup_string_list_init(&cfg_files, argc/2);
|
||||
if (error)
|
||||
goto err;
|
||||
|
||||
while ((c = getopt_long(argc, argv, "hl:L:t:a:d:f:s:", options,
|
||||
NULL)) > 0) {
|
||||
switch (c) {
|
||||
case 'h':
|
||||
usage(0, argv[0]);
|
||||
error = 0;
|
||||
goto err;
|
||||
case 'l':
|
||||
error = cgroup_string_list_add_item(&cfg_files, optarg);
|
||||
if (error) {
|
||||
fprintf(stderr, "%s: cannot add file to list,"\
|
||||
" out of memory?\n", argv[0]);
|
||||
goto err;
|
||||
}
|
||||
break;
|
||||
case 'L':
|
||||
cgroup_string_list_add_directory(&cfg_files, optarg,
|
||||
argv[0]);
|
||||
break;
|
||||
case 'a':
|
||||
/* set admin uid/gid */
|
||||
error = parse_uid_gid(optarg, &auid, &agid, argv[0]);
|
||||
if (error)
|
||||
goto err;
|
||||
break;
|
||||
case 't':
|
||||
/* set task uid/gid */
|
||||
error = parse_uid_gid(optarg, &tuid, &tgid, argv[0]);
|
||||
if (error)
|
||||
goto err;
|
||||
break;
|
||||
case 'd':
|
||||
dirm_change = 1;
|
||||
error = parse_mode(optarg, &dir_mode, argv[0]);
|
||||
if (error)
|
||||
goto err;
|
||||
break;
|
||||
case 'f':
|
||||
filem_change = 1;
|
||||
error = parse_mode(optarg, &file_mode, argv[0]);
|
||||
if (error)
|
||||
goto err;
|
||||
break;
|
||||
case 's':
|
||||
filem_change = 1;
|
||||
error = parse_mode(optarg, &tasks_mode, argv[0]);
|
||||
if (error)
|
||||
goto err;
|
||||
break;
|
||||
default:
|
||||
usage(1, argv[0]);
|
||||
error = -1;
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
|
||||
if (argv[optind]) {
|
||||
usage(1, argv[0]);
|
||||
error = -1;
|
||||
goto err;
|
||||
}
|
||||
|
||||
/* set default permissions */
|
||||
default_group = cgroup_new_cgroup("default");
|
||||
if (!default_group) {
|
||||
error = -1;
|
||||
fprintf(stderr, "%s: cannot create default cgroup\n", argv[0]);
|
||||
goto err;
|
||||
}
|
||||
|
||||
error = cgroup_set_uid_gid(default_group, tuid, tgid, auid, agid);
|
||||
if (error) {
|
||||
fprintf(stderr, "%s: cannot set default UID and GID: %s\n",
|
||||
argv[0], cgroup_strerror(error));
|
||||
goto free_cgroup;
|
||||
}
|
||||
|
||||
if (dirm_change | filem_change) {
|
||||
cgroup_set_permissions(default_group, dir_mode, file_mode,
|
||||
tasks_mode);
|
||||
}
|
||||
|
||||
error = cgroup_config_set_default(default_group);
|
||||
if (error) {
|
||||
fprintf(stderr, "%s: cannot set config parser defaults: %s\n",
|
||||
argv[0], cgroup_strerror(error));
|
||||
goto free_cgroup;
|
||||
}
|
||||
|
||||
for (i = 0; i < cfg_files.count; i++) {
|
||||
ret = cgroup_config_load_config(cfg_files.items[i]);
|
||||
if (ret) {
|
||||
fprintf(stderr, "%s; error loading %s: %s\n", argv[0],
|
||||
cfg_files.items[i],
|
||||
cgroup_strerror(ret));
|
||||
if (!error)
|
||||
error = ret;
|
||||
}
|
||||
}
|
||||
|
||||
free_cgroup:
|
||||
cgroup_free(&default_group);
|
||||
err:
|
||||
cgroup_string_list_free(&cfg_files);
|
||||
return error;
|
||||
}
|
235
libcgroup-0.41/src/tools/cgcreate.c
Normal file
235
libcgroup-0.41/src/tools/cgcreate.c
Normal file
@ -0,0 +1,235 @@
|
||||
/*
|
||||
* Copyright Red Hat, Inc. 2009
|
||||
*
|
||||
* Authors: Ivana Hutarova Varekova <varekova@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2.1 of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it would be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <libcgroup.h>
|
||||
#include <libcgroup-internal.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <pwd.h>
|
||||
#include <sys/types.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <grp.h>
|
||||
#include <getopt.h>
|
||||
|
||||
#include "tools-common.h"
|
||||
|
||||
/*
|
||||
* Display the usage
|
||||
*/
|
||||
static void usage(int status, const char *program_name)
|
||||
{
|
||||
if (status != 0) {
|
||||
fprintf(stderr, "Wrong input parameters,"
|
||||
" try %s -h' for more information.\n",
|
||||
program_name);
|
||||
return;
|
||||
}
|
||||
printf("Usage: %s [-h] [-f mode] [-d mode] [-s mode] "\
|
||||
"[-t <tuid>:<tgid>] [-a <agid>:<auid>] "\
|
||||
"-g <controllers>:<path> [-g ...]\n", program_name);
|
||||
printf("Create control group(s)\n");
|
||||
printf(" -a <tuid>:<tgid> Owner of the group and all "\
|
||||
"its files\n");
|
||||
printf(" -d, --dperm=mode Group directory permissions\n");
|
||||
printf(" -f, --fperm=mode Group file permissions\n");
|
||||
printf(" -g <controllers>:<path> Control group which should be "\
|
||||
"added\n");
|
||||
printf(" -h, --help Display this help\n");
|
||||
printf(" -s, --tperm=mode Tasks file permissions\n");
|
||||
printf(" -t <tuid>:<tgid> Owner of the tasks file\n");
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int ret = 0;
|
||||
int i, j;
|
||||
int c;
|
||||
|
||||
static struct option long_opts[] = {
|
||||
{"help", no_argument, NULL, 'h'},
|
||||
{"task", required_argument, NULL, 't'},
|
||||
{"admin", required_argument, NULL, 'a'},
|
||||
{"", required_argument, NULL, 'g'},
|
||||
{"dperm", required_argument, NULL, 'd'},
|
||||
{"fperm", required_argument, NULL, 'f' },
|
||||
{"tperm", required_argument, NULL, 's' },
|
||||
{0, 0, 0, 0},
|
||||
};
|
||||
|
||||
uid_t tuid = CGRULE_INVALID, auid = CGRULE_INVALID;
|
||||
gid_t tgid = CGRULE_INVALID, agid = CGRULE_INVALID;
|
||||
|
||||
struct cgroup_group_spec **cgroup_list;
|
||||
struct cgroup *cgroup;
|
||||
struct cgroup_controller *cgc;
|
||||
|
||||
/* approximation of max. numbers of groups that will be created */
|
||||
int capacity = argc;
|
||||
|
||||
/* permission variables */
|
||||
mode_t dir_mode = NO_PERMS;
|
||||
mode_t file_mode = NO_PERMS;
|
||||
mode_t tasks_mode = NO_PERMS;
|
||||
int dirm_change = 0;
|
||||
int filem_change = 0;
|
||||
|
||||
/* no parametr on input */
|
||||
if (argc < 2) {
|
||||
usage(1, argv[0]);
|
||||
return -1;
|
||||
}
|
||||
cgroup_list = calloc(capacity, sizeof(struct cgroup_group_spec *));
|
||||
if (cgroup_list == NULL) {
|
||||
fprintf(stderr, "%s: out of memory\n", argv[0]);
|
||||
ret = -1;
|
||||
goto err;
|
||||
}
|
||||
|
||||
/* parse arguments */
|
||||
while ((c = getopt_long(argc, argv, "a:t:g:hd:f:s:", long_opts, NULL))
|
||||
> 0) {
|
||||
switch (c) {
|
||||
case 'h':
|
||||
usage(0, argv[0]);
|
||||
ret = 0;
|
||||
goto err;
|
||||
case 'a':
|
||||
/* set admin uid/gid */
|
||||
if (parse_uid_gid(optarg, &auid, &agid, argv[0]))
|
||||
goto err;
|
||||
break;
|
||||
case 't':
|
||||
/* set task uid/gid */
|
||||
if (parse_uid_gid(optarg, &tuid, &tgid, argv[0]))
|
||||
goto err;
|
||||
break;
|
||||
case 'g':
|
||||
ret = parse_cgroup_spec(cgroup_list, optarg, capacity);
|
||||
if (ret) {
|
||||
fprintf(stderr, "%s: "
|
||||
"cgroup controller and path"
|
||||
"parsing failed (%s)\n",
|
||||
argv[0], argv[optind]);
|
||||
ret = -1;
|
||||
goto err;
|
||||
}
|
||||
break;
|
||||
case 'd':
|
||||
dirm_change = 1;
|
||||
ret = parse_mode(optarg, &dir_mode, argv[0]);
|
||||
if (ret)
|
||||
goto err;
|
||||
break;
|
||||
case 'f':
|
||||
filem_change = 1;
|
||||
ret = parse_mode(optarg, &file_mode, argv[0]);
|
||||
if (ret)
|
||||
goto err;
|
||||
break;
|
||||
case 's':
|
||||
filem_change = 1;
|
||||
ret = parse_mode(optarg, &tasks_mode, argv[0]);
|
||||
if (ret)
|
||||
goto err;
|
||||
break;
|
||||
default:
|
||||
usage(1, argv[0]);
|
||||
ret = -1;
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
|
||||
/* no cgroup name */
|
||||
if (argv[optind]) {
|
||||
fprintf(stderr, "%s: "
|
||||
"wrong arguments (%s)\n",
|
||||
argv[0], argv[optind]);
|
||||
ret = -1;
|
||||
goto err;
|
||||
}
|
||||
|
||||
/* initialize libcg */
|
||||
ret = cgroup_init();
|
||||
if (ret) {
|
||||
fprintf(stderr, "%s: "
|
||||
"libcgroup initialization failed: %s\n",
|
||||
argv[0], cgroup_strerror(ret));
|
||||
goto err;
|
||||
}
|
||||
|
||||
/* for each new cgroup */
|
||||
for (i = 0; i < capacity; i++) {
|
||||
if (!cgroup_list[i])
|
||||
break;
|
||||
|
||||
/* create the new cgroup structure */
|
||||
cgroup = cgroup_new_cgroup(cgroup_list[i]->path);
|
||||
if (!cgroup) {
|
||||
ret = ECGFAIL;
|
||||
fprintf(stderr, "%s: can't add new cgroup: %s\n",
|
||||
argv[0], cgroup_strerror(ret));
|
||||
goto err;
|
||||
}
|
||||
|
||||
/* set uid and gid for the new cgroup based on input options */
|
||||
ret = cgroup_set_uid_gid(cgroup, tuid, tgid, auid, agid);
|
||||
if (ret)
|
||||
goto err;
|
||||
|
||||
/* add controllers to the new cgroup */
|
||||
j = 0;
|
||||
while (cgroup_list[i]->controllers[j]) {
|
||||
cgc = cgroup_add_controller(cgroup,
|
||||
cgroup_list[i]->controllers[j]);
|
||||
if (!cgc) {
|
||||
ret = ECGINVAL;
|
||||
fprintf(stderr, "%s: "
|
||||
"controller %s can't be add\n",
|
||||
argv[0],
|
||||
cgroup_list[i]->controllers[j]);
|
||||
cgroup_free(&cgroup);
|
||||
goto err;
|
||||
}
|
||||
j++;
|
||||
}
|
||||
|
||||
/* all variables set so create cgroup */
|
||||
if (dirm_change | filem_change)
|
||||
cgroup_set_permissions(cgroup, dir_mode, file_mode,
|
||||
tasks_mode);
|
||||
ret = cgroup_create_cgroup(cgroup, 0);
|
||||
if (ret) {
|
||||
fprintf(stderr, "%s: "
|
||||
"can't create cgroup %s: %s\n",
|
||||
argv[0], cgroup->name, cgroup_strerror(ret));
|
||||
cgroup_free(&cgroup);
|
||||
goto err;
|
||||
}
|
||||
cgroup_free(&cgroup);
|
||||
}
|
||||
err:
|
||||
if (cgroup_list) {
|
||||
for (i = 0; i < capacity; i++) {
|
||||
if (cgroup_list[i])
|
||||
cgroup_free_group_spec(cgroup_list[i]);
|
||||
}
|
||||
free(cgroup_list);
|
||||
}
|
||||
return ret;
|
||||
}
|
178
libcgroup-0.41/src/tools/cgdelete.c
Normal file
178
libcgroup-0.41/src/tools/cgdelete.c
Normal file
@ -0,0 +1,178 @@
|
||||
/*
|
||||
* Copyright RedHat Inc. 2009
|
||||
*
|
||||
* Authors: Jan Safranek <jsafrane@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2.1 of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it would be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <libcgroup.h>
|
||||
#include <libcgroup-internal.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <getopt.h>
|
||||
|
||||
#include "tools-common.h"
|
||||
|
||||
static struct option const long_options[] =
|
||||
{
|
||||
{"recursive", no_argument, NULL, 'r'},
|
||||
{"help", no_argument, NULL, 'h'},
|
||||
{"group", required_argument, NULL, 'g'},
|
||||
{NULL, 0, NULL, 0}
|
||||
};
|
||||
|
||||
static void usage(int status, const char *program_name)
|
||||
{
|
||||
if (status != 0) {
|
||||
fprintf(stderr, "Wrong input parameters,"
|
||||
" try %s --help' for more information.\n",
|
||||
program_name);
|
||||
return;
|
||||
}
|
||||
printf("Usage: %s [-h] [-r] [[-g] <controllers>:<path>] ...\n",
|
||||
program_name);
|
||||
printf("Remove control group(s)\n");
|
||||
printf(" -g <controllers>:<path> Control group to be removed "\
|
||||
"(-g is optional)\n");
|
||||
printf(" -h, --help Display this help\n");
|
||||
printf(" -r, --recursive Recursively remove "\
|
||||
"all subgroups\n");
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int ret = 0;
|
||||
int i, j;
|
||||
int c;
|
||||
int flags = 0;
|
||||
int final_ret = 0;
|
||||
|
||||
struct cgroup_group_spec **cgroup_list = NULL;
|
||||
struct cgroup *cgroup;
|
||||
struct cgroup_controller *cgc;
|
||||
|
||||
/* initialize libcg */
|
||||
ret = cgroup_init();
|
||||
if (ret) {
|
||||
fprintf(stderr, "%s: "
|
||||
"libcgroup initialization failed: %s\n",
|
||||
argv[0], cgroup_strerror(ret));
|
||||
goto err;
|
||||
}
|
||||
|
||||
cgroup_list = calloc(argc, sizeof(struct cgroup_group_spec *));
|
||||
if (cgroup_list == NULL) {
|
||||
fprintf(stderr, "%s: out of memory\n", argv[0]);
|
||||
ret = -1;
|
||||
goto err;
|
||||
}
|
||||
|
||||
/*
|
||||
* Parse arguments
|
||||
*/
|
||||
while ((c = getopt_long(argc, argv, "rhg:",
|
||||
long_options, NULL)) > 0) {
|
||||
switch (c) {
|
||||
case 'r':
|
||||
flags |= CGFLAG_DELETE_RECURSIVE;
|
||||
break;
|
||||
case 'g':
|
||||
ret = parse_cgroup_spec(cgroup_list, optarg, argc);
|
||||
if (ret != 0) {
|
||||
fprintf(stderr,
|
||||
"%s: error parsing cgroup '%s'\n",
|
||||
argv[0], optarg);
|
||||
ret = -1;
|
||||
goto err;
|
||||
}
|
||||
break;
|
||||
case 'h':
|
||||
usage(0, argv[0]);
|
||||
ret = 0;
|
||||
goto err;
|
||||
default:
|
||||
usage(1, argv[0]);
|
||||
ret = -1;
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
|
||||
/* parse groups on command line */
|
||||
for (i = optind; i < argc; i++) {
|
||||
ret = parse_cgroup_spec(cgroup_list, argv[i], argc);
|
||||
if (ret != 0) {
|
||||
fprintf(stderr, "%s: error parsing cgroup '%s'\n",
|
||||
argv[0], argv[i]);
|
||||
ret = -1;
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
|
||||
/* for each cgroup to be deleted */
|
||||
for (i = 0; i < argc; i++) {
|
||||
if (!cgroup_list[i])
|
||||
break;
|
||||
|
||||
/* create the new cgroup structure */
|
||||
cgroup = cgroup_new_cgroup(cgroup_list[i]->path);
|
||||
if (!cgroup) {
|
||||
ret = ECGFAIL;
|
||||
fprintf(stderr, "%s: can't create new cgroup: %s\n",
|
||||
argv[0], cgroup_strerror(ret));
|
||||
goto err;
|
||||
}
|
||||
|
||||
/* add controllers to the cgroup */
|
||||
j = 0;
|
||||
while (cgroup_list[i]->controllers[j]) {
|
||||
cgc = cgroup_add_controller(cgroup,
|
||||
cgroup_list[i]->controllers[j]);
|
||||
if (!cgc) {
|
||||
ret = ECGFAIL;
|
||||
fprintf(stderr, "%s: "
|
||||
"controller %s can't be added\n",
|
||||
argv[0],
|
||||
cgroup_list[i]->controllers[j]);
|
||||
cgroup_free(&cgroup);
|
||||
goto err;
|
||||
}
|
||||
j++;
|
||||
}
|
||||
|
||||
ret = cgroup_delete_cgroup_ext(cgroup, flags);
|
||||
/*
|
||||
* Remember the errors and continue, try to remove all groups.
|
||||
*/
|
||||
if (ret != 0) {
|
||||
fprintf(stderr, "%s: cannot remove group '%s': %s\n",
|
||||
argv[0], cgroup->name,
|
||||
cgroup_strerror(ret));
|
||||
final_ret = ret;
|
||||
}
|
||||
cgroup_free(&cgroup);
|
||||
}
|
||||
|
||||
ret = final_ret;
|
||||
err:
|
||||
if (cgroup_list) {
|
||||
for (i = 0; i < argc; i++) {
|
||||
if (cgroup_list[i])
|
||||
cgroup_free_group_spec(cgroup_list[i]);
|
||||
}
|
||||
free(cgroup_list);
|
||||
}
|
||||
return ret;
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user