-
Notifications
You must be signed in to change notification settings - Fork 77
Open
Description
Building and running http_server.exe on Windows with good-ol'e WinPcap works great:

But pressing q to quit the program does not work. Adding some trace-code,
I see that WaitforSingleObject() in main() never returns!
I modified userTask():
static int user_task_deleted = 0;
....
else if(toupper(ch) == 'Q')
{
//Kill ourselves
TRACE_INFO ("calling 'osDeleteTask()'\n");
user_task_deleted = 1;
osDeleteTask(OS_SELF_TASK_ID);
}and main():
#define WAIT_TIMEOUT 258
//Wait until the user task has terminated
while (1)
{
TRACE_INFO ("user_task_deleted: %d\n", user_task_deleted);
if (WaitForSingleObject(taskId, 10000) != WAIT_TIMEOUT)
break;
}The while (1) loop never quits and the trace never shows a user_task_deleted: 1.
The only fix for me was to replace osDeleteTask(OS_SELF_TASK_ID); with ExitProcess(0);.
Someone please explain this.
PS. I built everything with bare minimum of features from git master some days ago (with cl and clang-cl) and
the latest CycloneTCP_SSL_*.zip from https://www.oryx-embedded.com/download/
Metadata
Metadata
Assignees
Labels
No labels