add child process guard; fix error with steppers server disconnection

This commit is contained in:
2021-10-28 16:00:14 +03:00
parent 237b11d640
commit 39b9cee77c
5 changed files with 69 additions and 23 deletions

View File

@@ -28,14 +28,14 @@ void makedebuglog();
void *my_malloc(size_t N, size_t S);
void my_free(void *ptr);
#undef FNAME
//#undef FNAME
#undef ALLOC
#undef MALLOC
#undef FREE
#define _LOG(...) do{if(!debuglog) makedebuglog(); sl_putlogt(1, debuglog, LOGLEVEL_ERR, __VA_ARGS__);}while(0)
#define DBGLOG(...) do{_LOG("%s (%s, line %d)", __func__, __FILE__, __LINE__); \
sl_putlogt(0, debuglog, LOGLEVEL_ERR, __VA_ARGS__);}while(0)
#define FNAME() _LOG("%s (%s, line %d)", __func__, __FILE__, __LINE__)
//#define FNAME() _LOG("%s (%s, line %d)", __func__, __FILE__, __LINE__)
#define _str(x) #x
#define ALLOC(type, var, size) DBGLOG("%s *%s = ALLOC(%d)", _str(type), _str(var), size*sizeof(type)); \