Advanced Search
Mail us
Home    Manuel    Links    Faq    Submit a tcl/tk Reference    Contact Us

    Some examples tcl/tk codes     Man of Bwidget     Man of blt     mkwidget screenshots     TkOgl     Video Demo real.


  exec: couldn`t create error file for command: Error 0
 
 If exec returns an error message of "couldn`t create error file for command: Error 0", the following may help: 

This problem exists under Unix and Windows NT. I have conclusive proof that under Unix it was being caused by the temporary
directory not being world writable, which explains why superusers were able to "exec" something but not a regular user. The
"gotcha!" is that /tmp is not necessarily the temporary directory that is used, so people were not seeing an obvious problem. Tcl
uses the tmpnam() system call, which on many systems actually uses /var/tmp, and on some systems that directory was not world
writable. I would like to call this a problem with one`s site administration.

Here`s a simple program to determine your temporary directory:

main()
{
char name[100];
tmpnam(name);
puts(name);
}

which prints out the full pathname for a potential new temporary file. If the specified directory is not world writable, you can`t
create temp files. 

Now, the question turns to Windows. This I have not yet resolved. Under NT, which has users and directory permissions, it may be
the same problem as under Unix. However, since this problem is also occurring under Windows 3.1 it may be another problem or
combination of the two. 

-Colin Stevens

On Windows, you will need to set both the TMP and TEMP environment variables, for example: 

SET TMP=C:TEMP
SET TEMP=C:TEMP

-Richard Ross-Langley