小编ofo*_*sho的帖子

获取文件在Linux中为CIFS Mount创建通知

我在ubuntu服务器上通过CIFS安装了Windows共享.我需要知道何时将新文件添加到Windows共享中.我试过这个inotify程序:

http://www.thegeekstuff.com/2010/04/inotify-c-program-example/

哪个适用于标准目录,但无法捕获任何CIFS更改.我不一定需要使用inotify,虽然我想,但任何有关如何完成获取文件创建通知的建议都会很棒.

linux samba cifs inotify

13
推荐指数
2
解决办法
1万
查看次数

如何ptrace多线程应用程序?

编辑(制作进展):

我试图ptrace一个vsftpd守护进程.我有以下代码附加到守护程序.然后它成功显示第一个衍生进程的PID.但是,对于这个衍生进程的子进程,它返回PID为2,3,..程序确实捕获了生成进程的退出,这让我觉得我很接近.

有任何想法吗?

void * trace_process(void * pid){
    pid_t child = atoi((char *) pid);
    long orig_eax, eax;
    int status;
    int callmade = FALSE;
    long opt = PTRACE_O_TRACEFORK;
    long newpid;

    long trace = ptrace(PTRACE_ATTACH,child,NULL,NULL);
    ptrace(PTRACE_SETOPTIONS,child,NULL,opt);
    if(trace == FALSE)
        printf("Attached to %d\n",child);

    while(TRUE) {
        child = waitpid(-1, &status, __WALL);

        if (status >> 16 == PTRACE_EVENT_FORK) {
            ptrace(PTRACE_GETEVENTMSG, child, NULL, (long) &newpid);
            ptrace(PTRACE_SYSCALL, newpid, NULL, NULL);       

            printf("Attached to offspring %ld\n", newpid);  
        }
        else{
            if(WIFEXITED(status))
                printf("Child %d exited\n", child);
        }

        ptrace(PTRACE_SYSCALL,child, NULL, NULL);
    } …
Run Code Online (Sandbox Code Playgroud)

c multithreading ptrace pthreads

6
推荐指数
1
解决办法
5604
查看次数

在Linux中,在进入sys调用时,%eax中的值是多少?(不是orig_eax)

当一个系统调用返回时,我得到了%eax中的系统调用的返回值,但是在进入我得到-38,这是0xFFFFFFDA十六进制.这适用于写/读.这个号码是多少?它可以用来安全地区分出口和出口吗?

linux x86 system-calls

6
推荐指数
1
解决办法
1893
查看次数

如何在MatPlotLib中注释/突出显示三维图

我想做这样的事情:在3d空间中的http://matplotlib.sourceforge.net/_images/86cbd17f31.png.基本上我想要突出表面图的一部分.有什么建议?

python matplotlib

3
推荐指数
1
解决办法
1606
查看次数

标签 统计

linux ×2

c ×1

cifs ×1

inotify ×1

matplotlib ×1

multithreading ×1

pthreads ×1

ptrace ×1

python ×1

samba ×1

system-calls ×1

x86 ×1