From owner-freebsd-emulation Wed Dec 4 16:41:08 1996 Return-Path: owner-emulation Received: (from root@localhost) by freefall.freebsd.org (8.8.3/8.7.3) id QAA25390 for emulation-outgoing; Wed, 4 Dec 1996 16:41:08 -0800 (PST) Received: from agora.rdrop.com (root@agora.rdrop.com [199.2.210.241]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id QAA25367; Wed, 4 Dec 1996 16:41:02 -0800 (PST) Received: from cactus.fi.uba.ar by agora.rdrop.com with smtp (Smail3.1.29.1 #17) id m0vVRrp-0008tWC; Wed, 4 Dec 96 16:40 PST Received: (from msagre@localhost) by cactus.fi.uba.ar (8.6.12/8.6.12) id VAA15141; Wed, 4 Dec 1996 21:07:33 -0300 Date: Wed, 4 Dec 1996 21:07:32 -0300 (ARST) From: Miguel Angel Sagreras To: emulation@freebsd.org cc: freebsd-hackers@freebsd.org Subject: Running ORACLE 7.2.2.4 on FreeBSD 2.2-SNAP Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-emulation@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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 #include #include #include #include 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