aboutsummaryrefslogtreecommitdiffstats
path: root/process.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2020-06-02 04:20:21 +0200
committerMattias Andrée <maandree@kth.se>2020-06-02 04:20:21 +0200
commitf84d2aebd4d295f08c50b88ed4452f6c9b6605e6 (patch)
treea6a731ac9a99f67021364091426cd58a6c7b0886 /process.c
parentFix exit status regression ... now I can go back to sleep again (diff)
downloadsctrace-f84d2aebd4d295f08c50b88ed4452f6c9b6605e6.tar.gz
sctrace-f84d2aebd4d295f08c50b88ed4452f6c9b6605e6.tar.bz2
sctrace-f84d2aebd4d295f08c50b88ed4452f6c9b6605e6.tar.xz
Reject i386 and x32 applications (not yet supported)
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--process.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/process.c b/process.c
index f979e21..117fd6a 100644
--- a/process.c
+++ b/process.c
@@ -9,7 +9,7 @@ static struct process tail;
void
init_process_list(void)
{
- head.next = &tail;
+ head.next = &tail;
tail.prev = &head;
}
@@ -17,25 +17,25 @@ init_process_list(void)
struct process *
find_process(pid_t pid)
{
- struct process *p;
- for (p = head.next; p->next; p = p->next)
- if (p->pid == pid)
- return p;
- return NULL;
+ struct process *p;
+ for (p = head.next; p->next; p = p->next)
+ if (p->pid == pid)
+ return p;
+ return NULL;
}
struct process *
add_process(pid_t pid, unsigned long int trace_options)
{
- struct process *proc;
+ struct process *proc;
int status;
- proc = calloc(1, sizeof(*proc));
+ proc = calloc(1, sizeof(*proc));
if (!proc)
- eprintf("calloc: %s\n");
- proc->pid = pid;
- proc->next = &tail;
+ eprintf("calloc: %s\n");
+ proc->pid = pid;
+ proc->next = &tail;
proc->prev = tail.prev;
proc->prev->next = proc;
tail.prev = proc;