【问题标题】:How do I know what is the sys error in pthread_mutex_destroy?我如何知道 pthread_mutex_destroy 中的 sys 错误是什么?
【发布时间】:2011-04-04 14:24:26
【问题描述】:

我正在使用命令“pthread_mutex_destroy(&lock);”。

当我检查返回值时 - 它返回数字 16。
在此命令的手册页中,据说失败时返回非零值,但没有指定的检查方法。

如果我无法访问 errno 消息,我如何知道错误的根源是什么?

【问题讨论】:

标签: c++ pthreads system-calls


【解决方案1】:

命令行:perror 16

来源:perror("pthread_mutex_destroy");

或使用strerror(16);

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-09-22
    • 2016-02-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多