Here we have supplied /bin/ls as the path, ls as the first argument and "-l" as argument to ls which generates the listing in a long format. If execl fails, it returns -1, and we use an error handler where the return value is stored in a ret variable.