阅读背景:

我可以获得不使用历史记录或〜/ .bash_history的执行命令吗?

来源:互联网 

My code:

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

int main(void)
{
    printf("entering main process---\n");
    int ret;
    char *argv[] = {"history",NULL};
    ret = execvp("history",argv);
    if(ret == -1) 
        perror("execl error");
    printf("exiting main process ----\n");
    return 0;
}
#include <stdio.h>
#include <stdlib



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: