unknown escape sequence: '\040'
Hello folks ..
am trying to understand ptrace for my project by running few trial program ..
i get this error
unknown escape sequence: '\040'
this is one of those trial programs
/* `tracer' parent */
#include <sys/ptrace.h>
#include <signal.h>
#include <sys/types.h>
#include <sys/wait.h>
main()
{
int pid, status;
if((pid = fork()) == 0) {
execl("/home2/lfy/child1", "child1", 0);
printf("exec failed...\n");
} else {
sleep(1);
kill(pid, SIGINT);
wait(&status); // wait for child to stop
if(WIFSTOPPED(status))
printf("child has stopped...\n");
sleep(3);
ptrace(PTRACE_CONT, pid, 0, 0);
/* Will not come out of this wait because
* child does not terminate.
*/
wait(&status);
}
}
/* compile this program to `child1' */
#include <sys/ptrace.h>
main()
{
ptrace(PTRACE_TRACEME, 0, 0, 0);
while(1) printf("hello\n");
}
thank you
|