----- Original Message ----- From: "Amith" <amith@multitech.co.in> To: "Newbies" <kernelnewbies@nl.linux.org> Sent: Friday, April 16, 2004 6:46 PM Subject: TASK_STOPPED. > 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; > } Are you sure, statement temp->state = TASK_STOPPED is executed. Put one printk there and check. Regards Mohanlal > > > /* 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/ > > -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/