From f05ae7de8d93658f835073135d04174580acfb8a Mon Sep 17 00:00:00 2001 From: Angelo Marletta Date: Sun, 24 Jun 2012 00:59:45 +0100 Subject: updated copyright header --- src/cpulimit.c | 24 ++++------------------- src/list.c | 43 +++++++++++++++++++----------------------- src/list.h | 9 ++------- src/process_group.c | 21 +++++++++++++++++++++ src/process_group.h | 4 ++-- src/process_iterator.c | 21 +++++++++++++++++++++ src/process_iterator.h | 4 ++-- src/process_iterator_apple.c | 21 +++++++++++++++++++++ src/process_iterator_freebsd.c | 21 +++++++++++++++++++++ src/process_iterator_linux.c | 21 +++++++++++++++++++++ tests/process_iterator_test.c | 21 +++++++++++++++++++++ 11 files changed, 155 insertions(+), 55 deletions(-) diff --git a/src/cpulimit.c b/src/cpulimit.c index 394b132..5353b90 100644 --- a/src/cpulimit.c +++ b/src/cpulimit.c @@ -1,8 +1,8 @@ /** * - * cpulimit - a cpu limiter for Linux + * cpulimit - a CPU limiter for Linux * - * Copyright (C) 2005-2008, by: Angelo Marletta + * Copyright (C) 2005-2012, by: Angelo Marletta * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -18,28 +18,12 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - ********************************************************************** + ************************************************************** * * This is a simple program to limit the cpu usage of a process * If you modify this code, send me a copy please * - * Date: 30/8/2008 - * Version: 1.2 beta - * Get the latest version at: http://cpulimit.sourceforge.net - * - * Changelog from 1.1: - * - reorganization of the code, splitted in more source files - * - cpu count detection, i.e. if you have 4 cpu, it is possible to limit up to 400% - * - in order to avoid deadlocks, cpulimit now prevents to limit itself - * - option --path eliminated, use --exe instead both for absolute path and file name - * - call setpriority() just once in limit_process() - * - no more segmentation fault when processes exit - * - no more memory corruption when processes exit - * - cpulimit exits if --lazy option is specified and the process terminates - * - target process can be created on-fly given command line - * - light and scalable algorithm for subprocesses detection and limitation - * - mac os support - * - minor enhancements and bugfixes + * Get the latest version at: http://github.com/opsengine/cpulimit * */ diff --git a/src/list.c b/src/list.c index 6fe1e06..a1c20a3 100644 --- a/src/list.c +++ b/src/list.c @@ -1,28 +1,23 @@ /** -* -* cpulimit - a cpu limiter for Linux -* -* Copyright (C) 2005-2008, by: Angelo Marletta -* -* 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 -* of the License, 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, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -* -********************************************************************** -* -* Dynamic list implementation -* -*/ + * + * cpulimit - a CPU limiter for Linux + * + * Copyright (C) 2005-2012, by: Angelo Marletta + * + * 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 + * of the License, 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ #include #include diff --git a/src/list.h b/src/list.h index 478635f..0b43a2b 100644 --- a/src/list.h +++ b/src/list.h @@ -1,8 +1,8 @@ /** * - * cpulimit - a cpu limiter for Linux + * cpulimit - a CPU limiter for Linux * - * Copyright (C) 2005-2008, by: Angelo Marletta + * Copyright (C) 2005-2012, by: Angelo Marletta * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -17,11 +17,6 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - ********************************************************************** - * - * Dynamic list interface - * */ #ifndef __LIST__ diff --git a/src/process_group.c b/src/process_group.c index 71f180b..671dd73 100644 --- a/src/process_group.c +++ b/src/process_group.c @@ -1,3 +1,24 @@ +/** + * + * cpulimit - a CPU limiter for Linux + * + * Copyright (C) 2005-2012, by: Angelo Marletta + * + * 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 + * of the License, 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + #include #include #include diff --git a/src/process_group.h b/src/process_group.h index 100711d..ab86816 100644 --- a/src/process_group.h +++ b/src/process_group.h @@ -1,8 +1,8 @@ /** * - * cpulimit - a cpu limiter for Linux + * cpulimit - a CPU limiter for Linux * - * Copyright (C) 2005-2012, by: Angelo Marletta + * Copyright (C) 2005-2012, by: Angelo Marletta * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/src/process_iterator.c b/src/process_iterator.c index 0e31c81..165f420 100644 --- a/src/process_iterator.c +++ b/src/process_iterator.c @@ -1,3 +1,24 @@ +/** + * + * cpulimit - a CPU limiter for Linux + * + * Copyright (C) 2005-2012, by: Angelo Marletta + * + * 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 + * of the License, 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + #include #include #include diff --git a/src/process_iterator.h b/src/process_iterator.h index 82fadac..ecbe995 100644 --- a/src/process_iterator.h +++ b/src/process_iterator.h @@ -1,8 +1,8 @@ /** * - * cpulimit - a cpu limiter for Linux + * cpulimit - a CPU limiter for Linux * - * Copyright (C) 2005-2012, by: Angelo Marletta + * Copyright (C) 2005-2012, by: Angelo Marletta * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/src/process_iterator_apple.c b/src/process_iterator_apple.c index ee574e7..d7aa5f3 100644 --- a/src/process_iterator_apple.c +++ b/src/process_iterator_apple.c @@ -1,3 +1,24 @@ +/** + * + * cpulimit - a CPU limiter for Linux + * + * Copyright (C) 2005-2012, by: Angelo Marletta + * + * 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 + * of the License, 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + int init_process_iterator(struct process_iterator *it) { return 0; } diff --git a/src/process_iterator_freebsd.c b/src/process_iterator_freebsd.c index eb6cfaa..a4bf38f 100644 --- a/src/process_iterator_freebsd.c +++ b/src/process_iterator_freebsd.c @@ -1,3 +1,24 @@ +/** + * + * cpulimit - a CPU limiter for Linux + * + * Copyright (C) 2005-2012, by: Angelo Marletta + * + * 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 + * of the License, 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + #include #include #include diff --git a/src/process_iterator_linux.c b/src/process_iterator_linux.c index a15be45..9e2f7f2 100644 --- a/src/process_iterator_linux.c +++ b/src/process_iterator_linux.c @@ -1,3 +1,24 @@ +/** + * + * cpulimit - a CPU limiter for Linux + * + * Copyright (C) 2005-2012, by: Angelo Marletta + * + * 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 + * of the License, 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + #include static int get_boot_time() diff --git a/tests/process_iterator_test.c b/tests/process_iterator_test.c index f5b7586..7b1c6b5 100644 --- a/tests/process_iterator_test.c +++ b/tests/process_iterator_test.c @@ -1,3 +1,24 @@ +/** + * + * cpulimit - a CPU limiter for Linux + * + * Copyright (C) 2005-2012, by: Angelo Marletta + * + * 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 + * of the License, 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + #include #include #include -- cgit v1.2.3