El 07/11/10 14:59, Bogdan Cristea escribió:
I am trying to use execl() command in order to execute 'less' program. It seems however that I need to pass to execl() the full path to less, otherwise I get an error. The path to 'less' is in PATH env variable. Is this the normal behavior of execl() ?
"It takes the environment for the new process image from the external variable environ in the current process."
I have this problem because I get 'less' from another env variable PAGER, but I am wondering why I need to figure out the entire path to a program in order to be able to execute it with execl().
Dont, libc program execution functions are very hard to use correctly, and you will certainly shoot yourself in the foot. I recommend you to use jengelh's excellent "LibHX" (zypper install libHX-devel) and see the manual [1] section 26, for the HXproc_* functions. [1] http://jengelh.medozas.de/documents/libHX_Documentation.pdf -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org