Use of signal.h in third-party library

PatrikB
Posts: 16
Joined: Tue Aug 07, 2018 7:43 pm

Use of signal.h in third-party library

Postby PatrikB » Sun Jan 20, 2019 10:53 am

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.

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

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

Postby ESP_Angus » Mon Jan 21, 2019 3:42 am

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

PatrikB
Posts: 16
Joined: Tue Aug 07, 2018 7:43 pm

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

Postby PatrikB » Mon Jan 21, 2019 6:34 pm

Ok, then i know :).

Thanks for your reply.

Who is online

Users browsing this forum: No registered users and 106 guests