From: Cyril H. <ch...@su...> - 2011-11-11 13:57:53
|
Hi! Commited thanks. > What happens now is: > spawn process > [NEW] signal it with SIGUSR1 (alloc) > [NEW] signal it with SIGUSR1 (free) Doing malloc() and/or free() from signal handler is simply wrong and will lead to memory corruptions or deadlocks someday. Here it may work most of the time as you aren't doing anything in the main program loop, but still correct way of doing this is to create pipe and sleep on the file decriptor. -- Cyril Hrubis ch...@su... |