Warning: Missing sentinel in function call

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.