Posix: Exec format error
Michael P. Reilly
arcege at shore.net
Wed Jun 2 11:02:34 EDT 1999
Rolf Wester <WESTER at ilt.fhg.de> wrote:
: Hi,
: when doing the following:
: import os
: id=os.fork()
: if id == 0:
: os.execl("/home/wester/test/test","-d", "indata")
: else:
: os.wait()
: I get the error message:
: OSError: [Errno 8] Exec format error
: Can aybody tell me how the format should look like?
Usually Errno 8 (ENOEXEC) means that the file is executable but not a
valid, understandable format. This could be because it is not a valid
binary executable for that machine, the binary is corrupted (eg. copied
over FTP in ASCII mode), or if a shell script does not have a proper
shebang line (#!).
Can you run /home/wester/test/test from the command line? If it is as
script, is the first line (#!) correct? Incidently, for OS problems,
it is usually a good idea to say what OS you are using.
-Arcege
More information about the Python-list
mailing list