You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At first I would like to say thank you, great job.
Unfortunately, I have a problem with your code. When I use it in a loop, the program creates a new process for the socket each time. After a few times the program hangs and crashes a thread in my program that works with this code. I even tried to use the close () and socket() + close() outside loop functions (crashes too). The program crashes after a few passes of the loop (sometimes at beginning, not always at the same time). I tried to debug the code (with prinf() before and after every functions) and the program crashes at different times. Sometimes read, sometimes write. Maybe you have an idea how to solve it?
The text was updated successfully, but these errors were encountered:
Ok, I debuged this code. In write() you sent 27 (0x1B). When you read() you should receive 28 (0x1C) in 1st byte.
But when I have error I read 220 (DC) in 1st byte. The problem is in reading. When I have bad 1st byte, program goes to sleep (do nothing), but never ends.
At first I would like to say thank you, great job.
Unfortunately, I have a problem with your code. When I use it in a loop, the program creates a new process for the socket each time. After a few times the program hangs and crashes a thread in my program that works with this code. I even tried to use the close () and socket() + close() outside loop functions (crashes too). The program crashes after a few passes of the loop (sometimes at beginning, not always at the same time). I tried to debug the code (with prinf() before and after every functions) and the program crashes at different times. Sometimes read, sometimes write. Maybe you have an idea how to solve it?
The text was updated successfully, but these errors were encountered: