which is correct:
#define SIZE 1024
.....
char buffer[SIZE];
.....
buffer[SIZE] = '\0';
.....
Type: Posts; User: tommyb05
which is correct:
#define SIZE 1024
.....
char buffer[SIZE];
.....
buffer[SIZE] = '\0';
.....
Alright, I believe I understand a little better now. Heres what I see when I run this code:
The program launches (and I want it to die 5 seconds after its launched)
I have to manually click "X"...
Thank you very much, works perfectly! :)
I'm pretty sure I wait() takes in an int for the child process's status (s here), but that isn't my problem. I can sleep() all I want but it still kills the process AFTER I close it manually, not...
This code is supposed to run through a loop and write data to a file descriptor.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
void format(int n, char...
The purpose of the following code is to complete this goal: launch a process, get its status, and then kill it.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include...
If happens as soon as I run the child process as the code is wrote. But I found if I use WIFSTOPPED instead of WIFSIGNALED to see the current signal, things work out.
Thanks. I'm catching the signals now, but I'm crashing the program before the signal is caught? Is there a way to catch the signal before I crash it with the overflow?
Does anyone here know how to achieve my goal (which you can find if you read above)?
The problem was putting PTRACE_CONT in the right spot, right after the fork() statement.. so thats fixed. Now its not catching the signals of the child, bleh :(
Anyone got any ideas?
I've asked a couple others places but no one yet has been able to get my program to work correctly. So please hear me out!
I'm writing a simple linux tracing debugger that will trace a child...