From: JS <um...@os...> - 2001-08-23 15:01:59
|
On Thu, 23 Aug 2001 01:51, you wrote: > jn...@us... said: > > I have also experienced that pb. What does this error mean ? > > errno 2 is ENOENT, which means the file couldn't be found. > > When exec says it, the executable isn't where you said it was or it isn= 't > in your $PATH. > > For those who came in late, I found some code that reported errors by nu= mber=20 and changed it to use strerrno() and fprintf() (or some such) and then go= t=20 some bizarre error. I reported it to the list, and Jeff said, "Happened to me too." The rough and ready workaround is [summer@possum summer]$ perror 2 errno 2 =3D No such file or directory [summer@possum summer]$ + and the source code for perror is [uml@dugite uml]$ cat /home/summer/src/perror.c #include <errno.h> #include <stdlib.h> #include <stdio.h> =20 int main(int argc, char *argv[], char * environ[]) { int eno; if (argc !=3D 2) { fprintf(stderr, "Usage: %s <errno>\n", argv[0]); exit(-1); } eno =3D atoi(argv[1]); printf("errno %d =3D %s\n", eno, strerror(eno)); return 0; }; |