开发者

Does posix_memalign catch signals?

开发者 https://www.devze.com 2023-02-26 12:56 出处:网络
Does po开发者_JAVA技巧six_memalign catch signals? I am allocating memory using posix_memalign and running timer in the background, i get a \"Interrupted system call exception\", from posix_memalign in

Does po开发者_JAVA技巧six_memalign catch signals? I am allocating memory using posix_memalign and running timer in the background, i get a "Interrupted system call exception", from posix_memalign in the logs.

Is it due to the timer signal? Or is there some other issue?

Thanks in advance.


My best guess is that you're treating the return value of posix_memalign incorrectly. This function does not return a pointer. It returns 0 on success and an error code on failure. Perhaps you're finding EINTR in errno after posix_memalign returns; this is meaningless since posix_memalign does not use errno.


The solution to my question is: Does posix_memalign catch signals?

0

精彩评论

暂无评论...
验证码 换一张
取 消