Skip to contentSkip to conversation

execve inside irq?

DISCUSSION Wojciech Kromer 2 participants 4 messages Apr 25, 2003

lore
Share & tools
lore
#0 lore raw

anyone knows ho to call execve inside irq

i just want to execve("/sbin/poweroff"....) in case of pressing power button on my board

--
* * * * * * * * * * * *
* per pedes ad astra! *
* * * * * * * * * * * * mailto:[email protected]

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

#1 lore raw
Quoted 5 lines · Wojciech Kromer

anyone knows ho to call execve inside irq

i just want to execve("/sbin/poweroff"....) in case of pressing power button on my board

Since I did not find a better solution yet I start a new kernel thread that takes care of poweroff when getting the power button interrupt. In this new thread I then send a SIGUSR1 to init, but you could probably call "execve("/sbin/poweroff"....) " as well.

Steven

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

#2 lore raw
Quoted 6 lines · I wrote:
Quoted 3 lines · Wojciech Kromer

anyone knows ho to call execve inside irq

Quoted 8 lines
Quoted 2 lines

i just want to execve("/sbin/poweroff"....) in case of pressing power button on my board

Since I did not find a better solution yet I start a new kernel thread that takes care of poweroff when getting the power button interrupt. In this new thread I then send a SIGUSR1 to init, but you could probably call "execve("/sbin/poweroff"....) " as well.

Of course I meant SIGUSR2. (Busybox') init powers down then...

Steven

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

#3 lore raw
In reply to Steven Scholz
Quoted 10 lines

Since I did not find a better solution yet I start a new kernel thread that takes care of poweroff when getting the power button interrupt. In this new thread I then send a SIGUSR1 to init, but you could probably call "execve("/sbin/poweroff"....) " as well.

Steven

thx, this method works fine

--
* * * * * * * * * * * *
* per pedes ad astra! *
* * * * * * * * * * * * mailto:[email protected]

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/