Re: Sending signals to user space program from kernel space

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

 



Reference signal.c
int send_sig(int sig, struct task_struct *p, int priv)
may be your need.

2009/2/3 jean-francois simon <jfs@xxxxxxxxxx>:
> how about kill_proc:
>
>
> like in
> kill_proc(pid,  SIGUSR1, 1);
>
> for example.
>
> -jfs
>
>
>
> Paraneetharan Chandrasekaran wrote:
>> Hi,
>>               You can write a netlink socket interface between your char
>> driver and userspace program. User space program can be made to wait in
>> "recvfrom" system call. Whenever even number comes in "i", a netlink
>> messages can be send to user space program.
>>
>> -- Paraneetharan C
>>
>> 2009/2/3 Sandeep K Sinha <sandeepksinha@xxxxxxxxx
>> <mailto:sandeepksinha@xxxxxxxxx>>
>>
>>     On Tue, Feb 3, 2009 at 6:59 AM, Pei Lin <telent997@xxxxxxxxx
>>     <mailto:telent997@xxxxxxxxx>> wrote:
>>     > why not use copy_from_user and copy_to_user?
>>     >
>>
>>     DIdn't understand what you meant, but the question is regarding a
>>     signal not data?
>>     Am I missing something ???
>>
>>     > 2009/2/1 Sandeep K Sinha <sandeepksinha@xxxxxxxxx
>>     <mailto:sandeepksinha@xxxxxxxxx>>:
>>     >> Write a daemon in userspace which runs in background and continuously
>>     >> send ioctl's to your driver and gets the value of i.
>>     >> If the value of i becomes even, you can write your desired code.
>>     >>
>>     >> Is this what you wanted ?
>>     >>
>>     >> On Sat, Jan 31, 2009 at 2:53 PM, rishi agrawal
>>     <postrishi@xxxxxxxxx <mailto:postrishi@xxxxxxxxx>> wrote:
>>     >>> Hello Everyone,
>>     >>>
>>     >>> I have a char device which when gets ioctl  case 'a' starts a
>>     for loop with
>>     >>> index ' i '.
>>     >>>
>>     >>> I want to send the value of index ' i ' to user space whenever '
>>     i ' is
>>     >>> even.
>>     >>>
>>     >>> I want some thing like the kernel space code of char device
>>     should send a
>>     >>> variable and also a 'signal' that it has send a value.
>>     >>>
>>     >>> How can it be done ?
>>     >>>
>>     >>> Its something like Pipes
>>     >>>
>>     >>> --
>>     >>> Regards,
>>     >>> Rishi B. Agrawal
>>     >>>
>>     >>>
>>     >>
>>     >>
>>     >>
>>     >> --
>>     >> Regards,
>>     >> Sandeep.
>>     >>
>>     >>
>>     >>
>>     >>
>>     >>
>>     >>
>>     >> "To learn is to change. Education is a process that changes the
>>     learner."
>>     >>
>>     >> --
>>     >> To unsubscribe from this list: send an email with
>>     >> "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
>>     <mailto:ecartis@xxxxxxxxxxxx>
>>     >> Please read the FAQ at http://kernelnewbies.org/FAQ
>>     >>
>>     >>
>>     >
>>
>>
>>
>>     --
>>     Regards,
>>     Sandeep.
>>
>>
>>
>>
>>
>>
>>     "To learn is to change. Education is a process that changes the
>>     learner."
>>
>>     --
>>     To unsubscribe from this list: send an email with
>>     "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
>>     <mailto:ecartis@xxxxxxxxxxxx>
>>     Please read the FAQ at http://kernelnewbies.org/FAQ
>>
>>
>
>
> --
>
> Best regards,
> _______________________________________
> jean-francois simon - themis computer
> 5, rue irene joliot curie
> 38320 eybens - france
> +33 (0)4 76 14 77 85 - www.themis.com
>
>
>
>

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at 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