3.0.15

From Msim

Revision as of 00:52, 4 February 2010 by Jloew (Talk | contribs)
Jump to: navigation, search

This page refers to the changes made in the 3.0.15 release of M-sim.

Release Date:

Syscalls

osf_sys_lseek does not return -1 when called on stdin, stdout or stderr on Tru64. Empirically, it appears to output the total number of characters printed for the current session.

#include <sys/types.h>
#include <unistd.h>
#include <iostream>
int main()
{

cout << "Weeee!" << endl; for(int i=0;i<10;i++) { off_t sval = lseek(i,0,1); cout << i << ": " << sval << endl; }

return 0;

}

On a new session:

jloew@tru64:~/syscall$ ./a.out
Weeee!
0:  722
1:  730
2:  738
3:  -1
4:  -1
5:  -1
6:  -1
7:  -1
8:  -1
9:  -1

Second execution:

jloew@tru64:~/syscall$ ./a.out
Weeee!
0:  864
1:  872
2:  880
3:  -1
4:  -1
5:  -1
6:  -1
7:  -1
8:  -1
9:  -1

The difference is consistent (typing into the command prompt and deleting it will increase this counter). This will be handled by returning an ever increasing number by M-Sim.

Personal tools