TASK_STOPPED.

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

 



Hi all,
            
            in init_module, i do the following.
            struct task_struct *temp;
             
            temp = get_current();
            
            now, i got through - temp->next_task till i find a process whose comm[16] element is 
            "tester" and tester is : (already running)

            if(strcmp(temp->comm,"tester")==0)
               {
                    temp->state = TASK_STOPPED;
               }
          
             
           /*   tester.c  */
            
           main()
           {  
           int counter=0;
           while(1) {
                     
                     printf(" counter = %d\n",counter++)
             }
           }
         
           gcc tester.c -o tester
           #./tester 

           Now i set temp->state = TASK_STOPPED. And was expecting "tester" to stop.
           My assumptions went wrong, "tester" never stopped.Why ?
 
regards,
Amith

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[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