gpt4 book ai didi

c - 在 HP UX 中找不到 rexec

转载 作者:太空宇宙 更新时间:2023-11-04 04:53:05 25 4
gpt4 key购买 nike

简单程序:

#include <sys/types.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <netinet/in.h>
#include <netdb.h>

int main(int argc, char **argv)
{
int ret = rexec((char**) 0, "", "", "", 0);

return 0;
}

编译:

$ g++ -o rexec -D_XOPEN_SOURCE_EXTENDED rexec.cpp

rexec.cpp: In function 'int main(int, char**)':
rexec.cpp:10:49: error: 'rexec' was not declared in this scope

最佳答案

These functions are not in POSIX.1-2001. The rexec() function first appeared in 4.2BSD, and is present on the BSDs, Solaris, and many other systems. The rexec_af() function is more recent, and less widespread.

来源:“man rexec”

关于c - 在 HP UX 中找不到 rexec,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12955644/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com