Search Results

Search: Posts Made By: alexthelion
3,420
Posted By RudiC
Well, read the man page, and read the reference...
Well, read the man page, and read the reference that alister gave in his post, where the use and function of the exec family is explained. You have to learn to tell an image (file) from a path,...
3,420
Posted By alister
The type of each argument that you pass to execv...
The type of each argument that you pass to execv may be correct, but paths[pathindex] is a path to a directory where execv expects a path to an executable.

For additional feedback, if execv...
3,420
Posted By RudiC
man page of execv:The file is the executable's...
man page of execv:The file is the executable's file name prefixed with an entire path. You supply a path, but no executable.
BTW, wouldn't it be better to fork once and then try to execute a file...
3,420
Posted By alister
You're using execv incorrectly. The first...
You're using execv incorrectly. The first argument should be a path to the executable, not a directory. See "Using execv()" @
http://pubs.opengroup.org/onlinepubs/9699919799/functions/exec.html
...
3,420
Posted By bakunin
Simple answer: because you don't look in all...
Simple answer: because you don't look in all directories. You only look in the directories in the PATH and this is exactly what the program does.

Have you written this program yourself or copied...
Showing results 1 to 5 of 5

 
All times are GMT -4. The time now is 06:43 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy