用于Linux的syslog_r? [英] syslog_r for Linux?

查看:115
本文介绍了用于Linux的syslog_r?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

伙计,我找不到用于Linux的syslog()的可重入版本...是否有一个?如果没有,那你呢?显而易见的答案是将日志记录工具移到单独的线程中,并序列化对syslog的访问权限...

Folks, I can't find the re-entrant version of syslog() for Linux...is there one? And if no, what do you? The obvious answer is to move logging facility into separate thread and serialise access to syslog...

推荐答案

根据

According to the POSIX specification, the syslog function is already thread-safe, and so implemented in Linux. So syslog_r is unnecessary - use syslog if you need a reentrant logger function.

这篇关于用于Linux的syslog_r?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆