Changeset 2514 for neercs


Ignore:
Timestamp:
Jul 1, 2008, 10:35:22 PM (12 years ago)
Author:
Sam Hocevar
Message:
  • Add kill() to the list of supported remote syscalls. We might need to send SIGCHLD to the grabbed process's parent.
Location:
neercs/trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • neercs/trunk/src/mytrace.c

    r2513 r2514  
    6060#define MYCALL_SETPGID  4
    6161#define MYCALL_SETSID   5
     62#define MYCALL_KILL     6
    6263
    6364#if defined __x86_64__
     
    8586#if defined __x86_64__
    8687int syscalls32[] =
    87     { 5, 6, 4, 63, 57, 66 }; /* from unistd_32.h on an amd64 system */
     88    { 5, 6, 4, 63, 57, 66, 37 }; /* from unistd_32.h on an amd64 system */
    8889int syscalls64[] =
    8990#else
    9091int syscalls32[] =
    9192#endif
    92     { SYS_open, SYS_close, SYS_write, SYS_dup2, SYS_setpgid, SYS_setsid };
     93    { SYS_open, SYS_close, SYS_write, SYS_dup2, SYS_setpgid, SYS_setsid,
     94      SYS_kill };
    9395
    9496struct mytrace
     
    243245#if defined USE_GRAB
    244246    return remote_syscall(t->pid, MYCALL_SETSID, 0, 0, 0);
     247#else
     248    errno = ENOSYS;
     249    return -1;
     250#endif
     251}
     252
     253int mytrace_kill(struct mytrace *t, long pid, int sig)
     254{
     255#if defined USE_GRAB
     256    return remote_syscall(t->pid, MYCALL_KILL, pid, sig, 0);
    245257#else
    246258    errno = ENOSYS;
  • neercs/trunk/src/mytrace.h

    r2513 r2514  
    2424int mytrace_setpgid(struct mytrace *t, long pid, long pgid);
    2525int mytrace_setsid(struct mytrace *t);
     26int mytrace_kill(struct mytrace *t, long pid, int sig);
    2627
Note: See TracChangeset for help on using the changeset viewer.