[MLton] MLton.TextIO.mkstemps
Matthew Fluet
fluet at cs.cornell.edu
Wed Nov 29 11:48:55 PST 2006
> What does the strace of the simple program look like? I.e., what are the
> flags to the creat system call?
On x86-darwin, which has ktrace/dump rather than strace, I get the
following:
10670 z CALL open(0xf80020a4,0xa01,0x180)
10670 z NAMI "/tmp/fileE3258L"
10670 z RET open -1 errno 17 File exists
10670 z CALL open(0xf80021b4,0xa01,0x180)
10670 z NAMI "/tmp/filenb29Ae"
10670 z RET open 3
10670 z CALL ioctl(0x3,FIODTYPE,0xbfffee6c)
10670 z RET ioctl -1 errno 25 Inappropriate ioctl for device
10670 z CALL ioctl(0x3,TIOCGETA,0xbfffee40)
10670 z RET ioctl -1 errno 25 Inappropriate ioctl for device
10670 z CALL fstat(0x3,0x18ce0)
10670 z RET fstat 0
10670 z CALL lseek(0x3,0,0x1)
10670 z RET lseek 0
On x86-linux, I get the following:
open("/tmp/fileE3258L", O_WRONLY|O_CREAT|O_EXCL|O_LARGEFILE, 0600) = -1 EEXIST (File exists)
open("/tmp/filenb29Ae", O_WRONLY|O_CREAT|O_EXCL|O_LARGEFILE, 0600) = 3
ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0xffff9fa8) = -1 ENOTTY (Inappropriate ioctl for device)
fstat64(0x3, 0x805fee0) = 0
_llseek(3, 0, [0], SEEK_CUR) = 0
I note that the ioctl calls aren't quite the same after the file is
created, although since they all return errors, I guess they aren't doing
anything.
More information about the MLton
mailing list