What will happen if I kill a process which is waiting for the retuan ioctl() syscall?

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

 



If I have these:

1. I have implemented a simple ioctl() system call which just delay a period and return.
2. Call this ioctl() from a userspace process, of course, this process will be blocked until ioctl() return.
3. Before ioctl() return, use `kill -9 <pid>` command terminates the process.

Question:

1. Can we instantly kill this process?
2. If we can instantly kill this process, does ioctl() still keep delay after killing?
3. If ioctl() still running even after we terminate this process, where does the return value ioctl() will return to?
4. How to keep the device's state consistent when we kill a process when it is invoking a system call?

Best regards.




Douglas
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



[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