What appeared during the course of writing an exercise was strange, because the translation said there was no Sentinel ?? What do you mean...
============================================
/*
// Exercise as follows to create a process
*/
# Include <unistd. h>
# Include <stdio. h>
# Include <stdlib. h>
Int main (void)
{
Printf ("Running ps with execlp \ n ");
Execlp ("Ps", "Ps", "-Ax", 0);/* <---- the row where the error occurs. Change the method. change 0 to (char *) 0 */
Printf ("done. \ n ");
Exit (0 );
}
======================================
Pexec. C: In the 'main' function:
Pexec. C: 8: warning: the guard is missing in function calls.
-----------------------------------------------------------
Obviously, Chinese characters cannot be clarified.
Switch to English: enter export lang = POSIX
Then let's look at it again.
---------------------
Pexec. C: In function 'main ':
Pexec. C: 8: Warning: Missing sentinel in function call
---------------------------------------
Baidu to Cu found that someone raised the same problem:
Conclusion:
When the memory is used, the two sides of the memory area are uncertain. Therefore, the system will prompt the two sides to be on guard. To put it bluntly, Initialization is required!
Http://bbs.chinaunix.net/thread-1335982-1-1.html
From: http://hi.baidu.com/esta_pessoa/blog/item/0d274c09eed076a32fddd4d8.html