Skip to contentSkip to conversation

Process exit codes

DISCUSSION [email protected] 2 participants 3 messages Feb 1, 2013 – Feb 2, 2013

lore
Share & tools
lore
#0 lore raw

i thought you just need to send a signal to it by a kernel function

Sent from my HTC

----- Reply message -----
From: "Grzegorz Dwornicki" <[email protected]>
To: <[email protected]>
Subject: Process exit codes
Date: Fri, Feb 1, 2013 9:17 pm
Hi
Can I kill process by changing its exit codes in task_struct structure? Lets do this in 2 steps:

1. Modify the exit codes in task_struct

2. Call schedule
I want to do something like kill -9 on specyfic process using kernel module
Thanks
G.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130202/38343b3f/attachment.html

#1 lore raw

Using syscall would be beter way I know. I was thinking what will happen if I change exit code of a process or/and process state. Will not this work similar? If soo then this is maybe faster method?

G.
1 lut 2013 18:57, "dspjmt at gmail.com" <[email protected]> napisa?(a):

Quoted 19 lines

i thought you just need to send a signal to it by a kernel function

Sent from my HTC

----- Reply message -----
From: "Grzegorz Dwornicki" <[email protected]>
To: <[email protected]>
Subject: Process exit codes
Date: Fri, Feb 1, 2013 9:17 pm

Hi

Can I kill process by changing its exit codes in task_struct structure? Lets do this in 2 steps:
1. Modify the exit codes in task_struct
2. Call schedule

Quoted 6 lines

I want to do something like kill -9 on specyfic process using kernel module

Thanks

G.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130201/ce98d7e5/attachment.html

author
#2 lore raw

It's not a system call, because you can't use system call in modules. I thought it's possible to fulfill your idea, you should better study the code of __exit(), to find out what the kernel do, you can do it manually, I thought you can modify the running state of the task, maybe the kernel would do the remaining work for you.

Quoted 30 lines · Grzegorz Dwornicki

Using syscall would be beter way I know. I was thinking what will happen if I change exit code of a process or/and process state. Will not this work similar? If soo then this is maybe faster method?

G.

1 lut 2013 18:57, "dspjmt at gmail.com" <[email protected]> napisa?(a):

Quoted 23 lines

i thought you just need to send a signal to it by a kernel function

Sent from my HTC

----- Reply message -----
From: "Grzegorz Dwornicki" <[email protected]>
To: <[email protected]>
Subject: Process exit codes
Date: Fri, Feb 1, 2013 9:17 pm

Hi

Can I kill process by changing its exit codes in task_struct structure? Lets do this in 2 steps:
1. Modify the exit codes in task_struct
2. Call schedule

I want to do something like kill -9 on specyfic process using kernel module

Thanks

G.