When in linux socket, SIGPIPE is an signal we must handle.
But when I want to handle it in ESP32. Errors will be reported during compilation:
```c
#include <signal.h>
#include <stdio.h>
void sighandler(int signum) {
printf("signal %d\n", signum);
}
void app_main(void) {
signal(SIGPIPE, sighandler);
raise(SIGPIPE);
}
```
Does ESP-IDF do not use signal.h?
And in ESP-IDF components signal handle is OK. Why?
And in ESP-IDF components the SIGPIPE handler with different action function (I search all of ESP-IDF folder). Doesn't that conflict?
Does signal.h can not use for developer?
-
- Posts: 37
- Joined: Fri Dec 24, 2021 12:40 pm
Re: Does signal.h can not use for developer?
Hi wangshuoran,
Signals and signal handling are not implemented in esp-idf. Calling raise() will abort the program.
Esp-idf contains several third party libraries which work on multiple platforms, so perhaps you found usage of 'signal' function which is intended for Linux. However, that code is not compiled in esp-idf.
(If you think there is some usage of 'signal' which is compiled as part of esp-idf build process, please point that out and we'll take a look!)
Signals and signal handling are not implemented in esp-idf. Calling raise() will abort the program.
Esp-idf contains several third party libraries which work on multiple platforms, so perhaps you found usage of 'signal' function which is intended for Linux. However, that code is not compiled in esp-idf.
(If you think there is some usage of 'signal' which is compiled as part of esp-idf build process, please point that out and we'll take a look!)
Who is online
Users browsing this forum: Bing [Bot] and 345 guests