LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   unknown escape sequence: '\040' (http://www.linuxquestions.org/questions/linux-general-1/unknown-escape-sequence-%5C040-710225/)

jiikka 03-09-2009 07:53 AM

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

hackson 03-09-2009 08:48 AM

I have faced the same issue it is because of your editor version, kindly use vi instead of gedit or vice versa to identify the these special characters.

Eclipse is also a good choice for trying c programming


All times are GMT -5. The time now is 08:58 PM.