different behaviour on fbsd and linux

Divacky Roman xdivac02 at stud.fit.vutbr.cz
Sat Feb 18 18:17:18 CET 2006


hi

this simple program

#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>

main() {
   pid_t pid;

   pid = fork();

   if (pid == 0)
      execl("/bin/ls", NULL);
}

works differently on fbsd and on linux. on fbsd it basically ls each record in
ENV on linux it executes ls listing all files in cwd.

can someone explain me why?

thnx

roman



More information about the Users-l mailing list