Date: Wed, 4 Dec 1996 21:07:32 -0300 (ARST) From: Miguel Angel Sagreras <msagre@cactus.fi.uba.ar> To: emulation@freebsd.org Cc: freebsd-hackers@freebsd.org Subject: Running ORACLE 7.2.2.4 on FreeBSD 2.2-SNAP Message-ID: <Pine.BSF.3.91.961204210556.15105D-100000@cactus.fi.uba.ar>
next in thread | raw e-mail | index | archive | help
To get ORACLE 7.2.2.4 for SCO running on FreeBSD 2.2-961014-SNAP, I have to modify two system call in the IBCS2 emulator. The first one was the system call ulimit, it returns -1 on type conversion between the 64 bits in the FreeBSD ffs and 32 bits type SCO fs causing ORACLE exit. The second one was signal system call, I had to mask IBCS2_..._MASK in it, I haven't IBCS2 reference manual, to modify the source to get the rigth code. To see the signal systemcall problem. I run the SCO binary of the next program. #include <stdio.h> #include <signal.h> #include <unistd.h> #include <sys/ipc.h> #include <sys/sem.h> int sid; struct sembuf sb; int time; void sigalarm (int id) { signal (0x100|SIGALRM, sigalarm); alarm (1); printf ("%d %s\n",time+1, (time) ? "times" : "time"); time++; semop (sid, &sb, 1); } main () { sid = semget (1234, 5, IPC_CREAT|0666); sb.sem_num = 1; sb.sem_op = -1; sb.sem_flg = 0; signal (0x100|SIGALRM, sigalarm); alarm (1); semop (sid, &sb, 1); return 0; } When I run it on SCO, I got this output. 1 time 2 times 3 times 4 times .... But when I run in FreeBSD, I got only this. 1 time Here, you have the modification I did. In file ibcs2_misc.c function ibcs2_ulimit case IBCS2_GETFSIZE: *retval = p->p_rlimit[RLIMIT_FSIZE].rlim_cur; if (*retval == -1) (*retval)--; return 0; In ibcs2_signal.c function ibcs2_sigsys int ibcs2_sigsys(p, uap, retval) register struct proc *p; struct ibcs2_sigsys_args *uap; int *retval; { struct sigaction sa; int signum; int error; caddr_t sg = stackgap_init(); uap->sig &= 0xff; signum = ibcs2_to_bsd_sig[IBCS2_SIGNO(SCARG(uap, sig))]; Miguel A. Sagreras Facultad de ingenieria Universidad de Buenos Aires e-mail : msagre@cactus.fi.uba.ar
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.91.961204210556.15105D-100000>