Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package cpulimit for openSUSE:Factory 
checked in at 2023-05-15 16:54:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/cpulimit (Old)
 and      /work/SRC/openSUSE:Factory/.cpulimit.new.1533 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "cpulimit"

Mon May 15 16:54:25 2023 rev:7 rq:1087118 version:3.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/cpulimit/cpulimit.changes        2023-05-02 
16:24:17.319682718 +0200
+++ /work/SRC/openSUSE:Factory/.cpulimit.new.1533/cpulimit.changes      
2023-05-15 16:54:38.824281260 +0200
@@ -1,0 +2,16 @@
+Sun May 14 17:50:51 UTC 2023 - Avindra Goolcharan <[email protected]>
+
+- update to 3.0:
+  * Fix an important bug in LimitCPU when the program is
+    monitoring both a program and its child processes via the "-m"
+    flag. In the past, it was possible LimitCPU would fail to spawn
+    new instances to monitor child processes if LimitCPU was not in
+    the user's default path. In other words, if we were launched
+    from /usr/local/bin and this directory was not in the default
+    path, then child processes might not be monitored. And the
+    failure would happen silently.
+  * Now LimitCPU will try to do a better job of launching new
+    monitors for child processes and it will print a warning
+    about any errors when run in verbose mode.
+
+-------------------------------------------------------------------

Old:
----
  cpulimit-2.9.tar.gz

New:
----
  cpulimit-3.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ cpulimit.spec ++++++
--- /var/tmp/diff_new_pack.VJ0ypZ/_old  2023-05-15 16:54:39.280283777 +0200
+++ /var/tmp/diff_new_pack.VJ0ypZ/_new  2023-05-15 16:54:39.284283799 +0200
@@ -18,12 +18,12 @@
 
 
 Name:           cpulimit
-Version:        2.9
+Version:        3.0
 Release:        0
 Summary:        Limit the CPU Usage of a Process
 License:        GPL-2.0-or-later
 Group:          System/Monitoring
-URL:            http://limitcpu.sourceforge.net/
+URL:            https://limitcpu.sourceforge.net
 Source0:        
https://downloads.sourceforge.net/limitcpu/%{name}-%{version}.tar.gz
 Patch0:         %{name}-2.2-do_not_forget_version.patch
 BuildRequires:  gcc

++++++ cpulimit-2.9.tar.gz -> cpulimit-3.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cpulimit-2.9/CHANGELOG new/cpulimit-3.0/CHANGELOG
--- old/cpulimit-2.9/CHANGELOG  2023-03-10 23:43:58.000000000 +0100
+++ new/cpulimit-3.0/CHANGELOG  2023-04-03 15:58:14.000000000 +0200
@@ -1,3 +1,11 @@
+========== Changes in 3.0 ================
+
+cpulimit could be run in an environment where it is not in the
+default path. This would cause an error when cpulimit was in monitor-tree
+mode (-m) as new monitoring processes could not be spawned.
+We now try to search the full path for cpulimit and, when not found,
+error and bail out gracefully.
+
 ========== Changes in 2.9 ================
 
 * When counting CPU cycles (jiffies) we now use
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cpulimit-2.9/Makefile new/cpulimit-3.0/Makefile
--- old/cpulimit-2.9/Makefile   2023-03-10 23:41:22.000000000 +0100
+++ new/cpulimit-3.0/Makefile   2023-04-03 15:49:52.000000000 +0200
@@ -1,4 +1,4 @@
-VERSION?=2.9
+VERSION?=3.0
 PREFIX?=/usr
 CFLAGS?=-Wall -O2
 CC?=clang
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cpulimit-2.9/cpulimit.1 new/cpulimit-3.0/cpulimit.1
--- old/cpulimit-2.9/cpulimit.1 2019-04-07 23:26:30.000000000 +0200
+++ new/cpulimit-3.0/cpulimit.1 2023-04-03 16:08:12.000000000 +0200
@@ -39,9 +39,13 @@
 .TP
 \fB\-m\fR, \fB\-\-monitor\-forks\fR
 watch and throttle child processes of the target process
-Warning: It is usually a bad idea to use this flag on a shell script. The 
commands
+Warning: It is usually a bad idea to use this flag, especially on a shell 
script. The commands
 in the script will each spawn a process which will, in turn, spawn more copies 
of
-this program to throttle them, bogging down the system.
+this program to throttle them, bogging down the system. Also, it is possible 
for
+a child process to die and for its PID to be assigned to another program. When 
this
+happens quickly it can cause cpulimit to target the new, unintended process 
before
+the old information has had a chance to be flushed out. Only use the 
monitor-forks
+option in specific cases, ideally on machines without a lot of new processes 
being spawned.
 .TP
 \fB\-r\fR, \fB\-\-restore\fR
 restore a process killed using the \-k flag.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cpulimit-2.9/cpulimit.c new/cpulimit-3.0/cpulimit.c
--- old/cpulimit-2.9/cpulimit.c 2023-03-10 23:41:03.000000000 +0100
+++ new/cpulimit-3.0/cpulimit.c 2023-04-03 15:53:52.000000000 +0200
@@ -779,9 +779,14 @@
                     printf("Starting monitor with: %s -l %s -p %s -z -m\n",
                             program_data->this_program, limit_amount,
                             process_identifier);
-                 execl(program_data->this_program, program_data->this_program,
+                 execlp(program_data->this_program, program_data->this_program,
                        "-l", limit_amount, "-p", process_identifier, 
                        "-z", "-m", (char *) NULL);
+                 // we should not return, report error and bail out
+                 if (verbose)
+                   printf("Error trying to execute %s\n", 
program_data->this_program);
+                 exit(1);
+                  
               }
               
          }    // end of creating a new monitor

Reply via email to