Page 1 of 1

Use of signal.h in third-party library

Posted: Sun Jan 20, 2019 10:53 am
by PatrikB
Hi,

A third party library that we are planning to use has a dependency to signal.h.

I have found that the ESP-IDF has this header file,
https://github.com/espressif/esp-idf/bl ... e/signal.h
https://github.com/espressif/esp-idf/bl ... s/signal.h

During compilation we get this error,
undefined reference to `signal'

The header file is included as: #include <signal.h>

Code snippet:

Code: Select all

signal(SIGPIPE, SIG_IGN);
We are using the release/v3.2 branch of ESP-IDF.

Re: Use of signal.h in third-party library

Posted: Mon Jan 21, 2019 3:42 am
by ESP_Angus
Hi PatrikB,

Unfortunately there are some standard libc headers in newlib for some features which are not supported in ESP-IDF. ESP-IDF and FreeRTOS has no concept of POSIX signal handlers, so code which calls signal() will not work.

I'm afraid you'll have to refactor the third party code so it doesn't require sending/receiving signals.

Angus

Re: Use of signal.h in third-party library

Posted: Mon Jan 21, 2019 6:34 pm
by PatrikB
Ok, then i know :).

Thanks for your reply.