how to change the cpu time limit of a running process

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi All,
Is there any way to change the cputime limit of a running process?

suppose I have a sample program say sample.c

int main()
{
         struct rlimit rl;
         rl.rlim_cur = 60;
         setrlimit(RLIMIT_CPU, &rl);
         while(1);10
         return 0;
}

gcc sample.c -o sample

suppose I ran the process, after say 10secs I want to change the cputime of the running process (./sample) to
120 secs/may be less than current say 50secs, is it possible , if yes any api() or anyway?

Thanks in advance.

Regards,
Santosh

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux