خرید بک لینک

Vote count: 0

I have a simple program that waits for user input via scanf() and does something depending on the input. I set up a handler to handle the interrupt signal and perform a function for me asynchronously. The issue is when the user types ctrl+c to trigger the interrupt, the function works but the terminal is still hung up on the scanf command and awaits input. My idea to fix this is to send a signal (through stdin) equivalent to the user hitting the enter button via the interrupt function to make it appear to the user that scanf is being interrupted as well. Please let me know if something like this is possible, thanks.

asked 13 secs ago

برچسب: نویسنده: استخدام کار تاريخ: پنجشنبه 7 مرداد 1395 ساعت: 4:34

صفحه بندی