Re: signal handling

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

 



On 5/12/06, Talib Alim <talibalm@xxxxxxxxxxx> wrote:
Some of the functions in my kernel module can sleep, for these functions I
have following code

if (signal_pending(current))
    {
     set_current_state(TASK_RUNNING);
     *errno = EINTR;
     return(something);
    }

You need to post more than 4 lines of code to get help, e.g. where is
this with respect to your "sleeping" code?

The problem is that even if I do ctrl-Z on the key board, abouve code
returns and user process stops.

What do you expect to happen? How do you know your user process (that
you suspended) is executing in your kernel module? I can't tell,
because you didn't paste the relevant code.

What is the correct way of handling this ? should I check for specified
signals, e.g. man 7 signal says that following signal should kill the
process and some of them shuold also do core

What are you actually trying to do? Please make it clear and concise,
and post it along with all of the code.

Thanks,
Nish

--
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