What is execlp system call?

1 answer

Answer

1157398

2026-03-21 18:15

+ Follow

The execlp system call in Unix-like operating systems is used to execute a program, replacing the current process with a new process image. It takes the name of the program to execute, followed by a list of arguments, ending with a NULL pointer. The "p" in execlp indicates that it will search for the program in the directories listed in the PATH environment variable. If successful, it does not return to the calling process; if it fails, it returns -1 and sets the errno variable.

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.