Re: _lseek (fd, 0, SEEK_SET) has been aborted

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



void parentProcess()
{

spawnChild (<argv0>, _fileno(tmpfile(), ...))
// spawnChild() is some function
waitForChildProcess(); // some function

}

Is your OS Vista by any chance? Note that tmpfile() returns NULL if you don't have enough privileges. I had that problem with tmpfile() on Vista.

the temporary file created on windows is placed in the root directory of the C:\ drive. Couldn't possibly be true you think? Think again. From microsoft's own documentation

The tmpfile function creates a temporary file and returns a pointer to that stream. The temporary file is created in the root directory. To create a temporary file in a directory other than the root, use tmpnam or tempnam in conjunction with fopen.

--
Aslan

.



Relevant Pages