Date: Tue, 08 Dec 98 12:21:44 -0600 From: "Richard Seaman, Jr." <lists@tar.com> To: "John Fieber" <jfieber@indiana.edu> Cc: "emulation@freebsd.org" <emulation@FreeBSD.ORG> Subject: Re: linux_pipe, broken? Message-ID: <199812081821.MAA08374@ns.tar.com>
index | next in thread | raw e-mail
[-- Attachment #1 --]
On Mon, 7 Dec 1998 17:26:44 -0500 (EST), John Fieber wrote:
>On Mon, 7 Dec 1998, Richard Seaman, Jr. wrote:
>
>> Is the pipe call in linux emulation (linux_pipe) broken?
>
>There are pipe related problems that prevent Oracle and the
>backup server in Sybase from working. I haven't looked into it
>but you might check the emulation list archives for references to
>oracle, sybase and pipes.
The attached diffs appear to correct the problems I was having
with linux_pipe. I'd be curious if they solve your problems
as well.
The example programs that come with linux threads now appear to
work in emulation mode (with additional patches that I haven't
sent). After a little more testing, I'll post the full diffs
for linux threads.
[-- Attachment #2 --]
Index: linux_misc.c
===================================================================
RCS file: /home/ncvs/src/sys/i386/linux/linux_misc.c,v
retrieving revision 1.46
diff -c -r1.46 linux_misc.c
*** linux_misc.c 1998/12/04 22:54:50 1.46
--- linux_misc.c 1998/12/08 18:11:04
***************
*** 659,672 ****
linux_pipe(struct proc *p, struct linux_pipe_args *args)
{
int error;
#ifdef DEBUG
printf("Linux-emul(%d): pipe(*)\n", p->p_pid);
#endif
! if (error = pipe(p, 0))
return error;
! if (error = copyout(p->p_retval, args->pipefds, 2*sizeof(int)))
return error;
p->p_retval[0] = 0;
return 0;
}
--- 659,681 ----
linux_pipe(struct proc *p, struct linux_pipe_args *args)
{
int error;
+ int reg_edx;
#ifdef DEBUG
printf("Linux-emul(%d): pipe(*)\n", p->p_pid);
#endif
! reg_edx = p->p_retval[1];
! if (error = pipe(p, 0)) {
! p->p_retval[1] = reg_edx;
return error;
! }
!
! if (error = copyout(p->p_retval, args->pipefds, 2*sizeof(int))) {
! p->p_retval[1] = reg_edx;
return error;
+ }
+
+ p->p_retval[1] = reg_edx;
p->p_retval[0] = 0;
return 0;
}
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199812081821.MAA08374>
