segmentation fault - Signal 11 segfault on wait() system call? -
I am working on a basic shell in C, in my implementation, I calculate the order of the rows and I Code> Fork () A new process
At the end of each instance, before I proceed in the next order, wait for on the child ()
in the previous code Was working fine, but in some way I broke it:
Program signal 11, with segmentation fault Expiry # 0xfef28730 from _waitpid () to /usr/lib/libc.so.1 (gdb) from backtrace # 0xfef28730 in _waitpid () /usr/lib/libc.so.1 # 1 0xfef28770 _wait () from / Main ()
in usr in / Lib / libc.so.1 # 2 0xfef696d1 in wait () /usr/lib/libc.so.1 to # 3 0x08051428 Why, and in which case
wait ()
will cause the default? How can I go about debugging this kind of thing?
You are probably giving an invalid indicator for the reasoning argument (2).
How to debug this type, my first step is to establish debugging symbols for your C library. Then see which point it is at fault and to detect the stack (if possible).
Comments
Post a Comment