From owner-freebsd-emulation Mon Sep 2 11:44: 6 2002 Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DDFFD37B400 for ; Mon, 2 Sep 2002 11:43:59 -0700 (PDT) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by mx1.FreeBSD.org (Postfix) with SMTP id 908C743E77 for ; Mon, 2 Sep 2002 11:43:57 -0700 (PDT) (envelope-from iedowse@maths.tcd.ie) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 2 Sep 2002 19:43:55 +0100 (BST) To: Mark Santcroos Cc: emulation@freebsd.org, vsilyaev@mindspring.com Subject: Re: vmware2 fix for fo_ioctl api change In-Reply-To: Your message of "Tue, 20 Aug 2002 13:01:34 +0200." <20020820110134.GG716@laptop.6bone.nl> Date: Mon, 02 Sep 2002 19:43:52 +0100 From: Ian Dowse Message-ID: <200209021943.aa05393@salmon.maths.tcd.ie> Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org In message <20020820110134.GG716@laptop.6bone.nl>, Mark Santcroos writes: >Attached patches fixes compilation of vmware2 on -CURRENT. >Note that it doesn't work at the moment, but that has other reasons and >will be addressed in a seperate patch. >(Not sure yet whether it is a vmware thing or a linux emu thing) The following patch seems to make it actually run on -current for me, though I haven't tested it very extensively. Ian Index: files/patch-be =================================================================== RCS file: /home/iedowse/CVS/ports/emulators/vmware2/files/patch-be,v retrieving revision 1.2 diff -u -r1.2 patch-be --- files/patch-be 12 Jul 2001 14:26:10 -0000 1.2 +++ files/patch-be 2 Sep 2002 18:32:43 -0000 @@ -1,5 +1,5 @@ ---- vmmon-only/freebsd/hostif.c.orig Thu Jul 12 22:05:29 2001 -+++ vmmon-only/freebsd/hostif.c Thu Jul 12 22:14:09 2001 +--- vmmon-only/freebsd/hostif.c.orig Mon Sep 2 19:19:50 2002 ++++ vmmon-only/freebsd/hostif.c Mon Sep 2 19:30:03 2002 @@ -55,7 +55,11 @@ #include @@ -12,75 +12,113 @@ #include #include #include -@@ -107,7 +111,16 @@ +@@ -107,7 +111,21 @@ paddr = (vm_offset_t)addr; m = PHYS_TO_VM_PAGE(paddr); -+#if __FreeBSD_version >= 500021 +- vm_page_wire(m); ++#if __FreeBSD_version >= 500038 + GIANT_REQUIRED; ++ vm_page_lock_queues(); ++ vm_page_wire(m); ++ vm_page_unlock_queues(); ++#elif __FreeBSD_version >= 500021 ++ GIANT_REQUIRED; ++ vm_page_wire(m); +#elif __FreeBSD_version >= 500013 + mtx_lock(&vm_mtx); -+#endif - vm_page_wire(m); -+#if __FreeBSD_version >= 500021 -+#elif __FreeBSD_version >= 500013 ++ vm_page_wire(m); + mtx_unlock(&vm_mtx); ++#else ++ vm_page_wire(m); +#endif return 0; } -@@ -120,7 +133,16 @@ +@@ -120,7 +138,21 @@ paddr = (vm_offset_t)addr; m = PHYS_TO_VM_PAGE(paddr); -+#if __FreeBSD_version >= 500021 ++#if __FreeBSD_version >= 500038 ++ GIANT_REQUIRED; ++ vm_page_lock_queues(); ++ vm_page_unwire(m, 1); ++ vm_page_unlock_queues(); ++#elif __FreeBSD_version >= 500021 + GIANT_REQUIRED; ++ vm_page_unwire(m, 1); +#elif __FreeBSD_version >= 500013 + mtx_lock(&vm_mtx); -+#endif vm_page_unwire(m, 1); -+#if __FreeBSD_version >= 500021 -+#elif __FreeBSD_version >= 500013 + mtx_unlock(&vm_mtx); ++#else ++ vm_page_unwire(m, 1); +#endif return 0; } -@@ -1066,10 +1088,19 @@ +@@ -1066,10 +1098,33 @@ return NULL; } paddr = vtophys(addr); -+#if __FreeBSD_version >= 500021 -+ GIANT_REQUIRED; ++#if __FreeBSD_version >= 500038 ++ GIANT_REQUIRED; ++ ka->kaddr = kmem_alloc_pageable(kernel_map, PAGE_SIZE); ++ ka->map = PHYS_TO_VM_PAGE(paddr); ++ vm_page_lock_queues(); ++ vm_page_wire(ka->map); ++ vm_page_unlock_queues(); ++ pmap_qenter(ka->kaddr, &ka->map, 1); ++#elif __FreeBSD_version >= 500021 ++ GIANT_REQUIRED; ++ ka->kaddr = kmem_alloc_pageable(kernel_map, PAGE_SIZE); ++ ka->map = PHYS_TO_VM_PAGE(paddr); ++ vm_page_wire(ka->map); ++ pmap_kenter(ka->kaddr, paddr); +#elif __FreeBSD_version >= 500013 + mtx_lock(&vm_mtx); -+#endif ++ ka->kaddr = kmem_alloc_pageable(kernel_map, PAGE_SIZE); ++ ka->map = PHYS_TO_VM_PAGE(paddr); ++ vm_page_wire(ka->map); ++ pmap_kenter(ka->kaddr, paddr); ++ mtx_unlock(&vm_mtx); ++#else ka->kaddr = kmem_alloc_pageable(kernel_map, PAGE_SIZE); ka->map = PHYS_TO_VM_PAGE(paddr); vm_page_wire(ka->map); pmap_kenter(ka->kaddr, paddr); -+#if __FreeBSD_version >= 500021 -+#elif __FreeBSD_version >= 500013 -+ mtx_unlock(&vm_mtx); +#endif return ka->kaddr; } -@@ -1079,9 +1110,18 @@ +@@ -1079,9 +1134,29 @@ if (ka->map==NULL) return 0; -+#if __FreeBSD_version >= 500021 +- vm_page_unwire(ka->map, 1); +- pmap_kremove(ka->kaddr); ++#if __FreeBSD_version >= 500038 + GIANT_REQUIRED; -+#elif __FreeBSD_version >= 500013 -+ mtx_lock(&vm_mtx); -+#endif - vm_page_unwire(ka->map, 1); - pmap_kremove(ka->kaddr); ++ vm_page_lock_queues(); ++ vm_page_unwire(ka->map, 1); ++ vm_page_unlock_queues(); ++ pmap_qremove(ka->kaddr, 1); kmem_free(kernel_map, ka->kaddr, PAGE_SIZE); -+#if __FreeBSD_version >= 500021 ++#elif __FreeBSD_version >= 500021 ++ GIANT_REQUIRED; ++ vm_page_unwire(ka->map, 1); ++ pmap_kremove(ka->kaddr); ++ kmem_free(kernel_map, ka->kaddr, PAGE_SIZE); +#elif __FreeBSD_version >= 500013 ++ mtx_lock(&vm_mtx); ++ vm_page_unwire(ka->map, 1); ++ pmap_kremove(ka->kaddr); ++ kmem_free(kernel_map, ka->kaddr, PAGE_SIZE); + mtx_unlock(&vm_mtx); ++#else ++ vm_page_unwire(ka->map, 1); ++ pmap_kremove(ka->kaddr); ++ kmem_free(kernel_map, ka->kaddr, PAGE_SIZE); +#endif ka->kaddr = 0; ka->map = NULL; To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message From owner-freebsd-emulation Mon Sep 2 15:46:37 2002 Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5C40C37B401 for ; Mon, 2 Sep 2002 15:46:26 -0700 (PDT) Received: from birch.ripe.net (birch.ripe.net [193.0.1.96]) by mx1.FreeBSD.org (Postfix) with ESMTP id F2ABB43E7B for ; Mon, 2 Sep 2002 15:46:24 -0700 (PDT) (envelope-from marks@ripe.net) Received: from laptop.6bone.nl (cow.ripe.net [193.0.1.239]) by birch.ripe.net (8.12.5/8.11.6) with SMTP id g82MkMEs015613; Tue, 3 Sep 2002 00:46:22 +0200 Received: (nullmailer pid 6601 invoked by uid 1000); Mon, 02 Sep 2002 22:45:46 -0000 Date: Tue, 3 Sep 2002 00:45:46 +0200 From: Mark Santcroos To: Ian Dowse Cc: emulation@FreeBSD.ORG Subject: Re: vmware2 fix for fo_ioctl api change Message-ID: <20020902224546.GA715@laptop.6bone.nl> References: <20020820110134.GG716@laptop.6bone.nl> <200209021943.aa05393@salmon.maths.tcd.ie> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200209021943.aa05393@salmon.maths.tcd.ie> User-Agent: Mutt/1.4i X-Handles: MS6-6BONE, MS18417-RIPE X-RIPE-Spam-Status: NONE ; -1034 X-RIPE-Spam-Level: Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Hi Ian, I'm getting this, so thats probably not the thing your patch is fixing. (I tried it also actually) -------- linux: 'ioctl' fd=10, cmd=0x5401 ('T',1) not implemented dscheck(md0): bio_bcount 1648 is not on a sector boundary (ssize 512) linux: 'ioctl' fd=10, cmd=0x5401 ('T',1) not implemented linux: 'ioctl' fd=12, cmd=0x5401 ('T',1) not implemented dscheck(md0): bio_bcount 1648 is not on a sector boundary (ssize 512) linux: 'ioctl' fd=12, cmd=0x5401 ('T',1) not implemented linux: 'ioctl' fd=10, cmd=0x5401 ('T',1) not implemented dscheck(md0): bio_bcount 1648 is not on a sector boundary (ssize 512) linux: 'ioctl' fd=10, cmd=0x5401 ('T',1) not implemented ---------- I haven't had the time yet to do a binary search to find the commit that broke it. Hopefully soon.. Thanks Mark On Mon, Sep 02, 2002 at 07:43:52PM +0100, Ian Dowse wrote: > In message <20020820110134.GG716@laptop.6bone.nl>, Mark Santcroos writes: > >Attached patches fixes compilation of vmware2 on -CURRENT. > >Note that it doesn't work at the moment, but that has other reasons and > >will be addressed in a seperate patch. > >(Not sure yet whether it is a vmware thing or a linux emu thing) > > The following patch seems to make it actually run on -current for > me, though I haven't tested it very extensively. > > Ian > > Index: files/patch-be > =================================================================== > RCS file: /home/iedowse/CVS/ports/emulators/vmware2/files/patch-be,v > retrieving revision 1.2 > diff -u -r1.2 patch-be > --- files/patch-be 12 Jul 2001 14:26:10 -0000 1.2 > +++ files/patch-be 2 Sep 2002 18:32:43 -0000 > @@ -1,5 +1,5 @@ > ---- vmmon-only/freebsd/hostif.c.orig Thu Jul 12 22:05:29 2001 > -+++ vmmon-only/freebsd/hostif.c Thu Jul 12 22:14:09 2001 > +--- vmmon-only/freebsd/hostif.c.orig Mon Sep 2 19:19:50 2002 > ++++ vmmon-only/freebsd/hostif.c Mon Sep 2 19:30:03 2002 > @@ -55,7 +55,11 @@ > > #include > @@ -12,75 +12,113 @@ > #include > #include > #include > -@@ -107,7 +111,16 @@ > +@@ -107,7 +111,21 @@ > > paddr = (vm_offset_t)addr; > m = PHYS_TO_VM_PAGE(paddr); > -+#if __FreeBSD_version >= 500021 > +- vm_page_wire(m); > ++#if __FreeBSD_version >= 500038 > + GIANT_REQUIRED; > ++ vm_page_lock_queues(); > ++ vm_page_wire(m); > ++ vm_page_unlock_queues(); > ++#elif __FreeBSD_version >= 500021 > ++ GIANT_REQUIRED; > ++ vm_page_wire(m); > +#elif __FreeBSD_version >= 500013 > + mtx_lock(&vm_mtx); > -+#endif > - vm_page_wire(m); > -+#if __FreeBSD_version >= 500021 > -+#elif __FreeBSD_version >= 500013 > ++ vm_page_wire(m); > + mtx_unlock(&vm_mtx); > ++#else > ++ vm_page_wire(m); > +#endif > return 0; > } > > -@@ -120,7 +133,16 @@ > +@@ -120,7 +138,21 @@ > > paddr = (vm_offset_t)addr; > m = PHYS_TO_VM_PAGE(paddr); > -+#if __FreeBSD_version >= 500021 > ++#if __FreeBSD_version >= 500038 > ++ GIANT_REQUIRED; > ++ vm_page_lock_queues(); > ++ vm_page_unwire(m, 1); > ++ vm_page_unlock_queues(); > ++#elif __FreeBSD_version >= 500021 > + GIANT_REQUIRED; > ++ vm_page_unwire(m, 1); > +#elif __FreeBSD_version >= 500013 > + mtx_lock(&vm_mtx); > -+#endif > vm_page_unwire(m, 1); > -+#if __FreeBSD_version >= 500021 > -+#elif __FreeBSD_version >= 500013 > + mtx_unlock(&vm_mtx); > ++#else > ++ vm_page_unwire(m, 1); > +#endif > return 0; > } > > -@@ -1066,10 +1088,19 @@ > +@@ -1066,10 +1098,33 @@ > return NULL; > } > paddr = vtophys(addr); > -+#if __FreeBSD_version >= 500021 > -+ GIANT_REQUIRED; > ++#if __FreeBSD_version >= 500038 > ++ GIANT_REQUIRED; > ++ ka->kaddr = kmem_alloc_pageable(kernel_map, PAGE_SIZE); > ++ ka->map = PHYS_TO_VM_PAGE(paddr); > ++ vm_page_lock_queues(); > ++ vm_page_wire(ka->map); > ++ vm_page_unlock_queues(); > ++ pmap_qenter(ka->kaddr, &ka->map, 1); > ++#elif __FreeBSD_version >= 500021 > ++ GIANT_REQUIRED; > ++ ka->kaddr = kmem_alloc_pageable(kernel_map, PAGE_SIZE); > ++ ka->map = PHYS_TO_VM_PAGE(paddr); > ++ vm_page_wire(ka->map); > ++ pmap_kenter(ka->kaddr, paddr); > +#elif __FreeBSD_version >= 500013 > + mtx_lock(&vm_mtx); > -+#endif > ++ ka->kaddr = kmem_alloc_pageable(kernel_map, PAGE_SIZE); > ++ ka->map = PHYS_TO_VM_PAGE(paddr); > ++ vm_page_wire(ka->map); > ++ pmap_kenter(ka->kaddr, paddr); > ++ mtx_unlock(&vm_mtx); > ++#else > ka->kaddr = kmem_alloc_pageable(kernel_map, PAGE_SIZE); > ka->map = PHYS_TO_VM_PAGE(paddr); > vm_page_wire(ka->map); > pmap_kenter(ka->kaddr, paddr); > -+#if __FreeBSD_version >= 500021 > -+#elif __FreeBSD_version >= 500013 > -+ mtx_unlock(&vm_mtx); > +#endif > return ka->kaddr; > } > > -@@ -1079,9 +1110,18 @@ > +@@ -1079,9 +1134,29 @@ > if (ka->map==NULL) > return 0; > > -+#if __FreeBSD_version >= 500021 > +- vm_page_unwire(ka->map, 1); > +- pmap_kremove(ka->kaddr); > ++#if __FreeBSD_version >= 500038 > + GIANT_REQUIRED; > -+#elif __FreeBSD_version >= 500013 > -+ mtx_lock(&vm_mtx); > -+#endif > - vm_page_unwire(ka->map, 1); > - pmap_kremove(ka->kaddr); > ++ vm_page_lock_queues(); > ++ vm_page_unwire(ka->map, 1); > ++ vm_page_unlock_queues(); > ++ pmap_qremove(ka->kaddr, 1); > kmem_free(kernel_map, ka->kaddr, PAGE_SIZE); > -+#if __FreeBSD_version >= 500021 > ++#elif __FreeBSD_version >= 500021 > ++ GIANT_REQUIRED; > ++ vm_page_unwire(ka->map, 1); > ++ pmap_kremove(ka->kaddr); > ++ kmem_free(kernel_map, ka->kaddr, PAGE_SIZE); > +#elif __FreeBSD_version >= 500013 > ++ mtx_lock(&vm_mtx); > ++ vm_page_unwire(ka->map, 1); > ++ pmap_kremove(ka->kaddr); > ++ kmem_free(kernel_map, ka->kaddr, PAGE_SIZE); > + mtx_unlock(&vm_mtx); > ++#else > ++ vm_page_unwire(ka->map, 1); > ++ pmap_kremove(ka->kaddr); > ++ kmem_free(kernel_map, ka->kaddr, PAGE_SIZE); > +#endif > ka->kaddr = 0; > ka->map = NULL; > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-emulation" in the body of the message -- Mark Santcroos RIPE Network Coordination Centre http://www.ripe.net/home/mark/ New Projects Group/TTM To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message From owner-freebsd-emulation Mon Sep 2 21:57:17 2002 Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8D5A837B400 for ; Mon, 2 Sep 2002 21:57:15 -0700 (PDT) Received: from roam.psg.com (C143.apnic14.nic.ad.jp [202.11.26.143]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2D51143E65 for ; Mon, 2 Sep 2002 21:57:15 -0700 (PDT) (envelope-from randy@psg.com) Received: from localhost ([127.0.0.1] helo=roam.psg.com.psg.com ident=randy) by roam.psg.com with esmtp (Exim 4.05) id 17m5kQ-00016J-00 for freebsd-emulation@freebsd.org; Mon, 02 Sep 2002 21:57:06 -0700 From: Randy Bush MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: freebsd emulator list Subject: usb mouse vs vmware2 Message-Id: Date: Mon, 02 Sep 2002 21:57:06 -0700 Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org dell latitude c600 recent -stable X 4.2.0 all ports kept current using portupgrade with no moused and using ps/2 protocol on /dev/psm0, vmware has been working fine for a loooong time so i get a cute little usb mouse. with either moused or ps/2 /dev/ums0 vmware makes ugly screen when starting and aborts clues? randy To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message From owner-freebsd-emulation Tue Sep 3 19: 9:35 2002 Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 15E7837B400 for ; Tue, 3 Sep 2002 19:09:31 -0700 (PDT) Received: from kayak.xcllnt.net (209-128-86-226.bayarea.net [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8773243E75 for ; Tue, 3 Sep 2002 19:09:30 -0700 (PDT) (envelope-from marcel@xcllnt.net) Received: from dhcp01.pn.xcllnt.net (dhcp01.pn.xcllnt.net [192.168.4.201]) by kayak.xcllnt.net (8.11.6/8.11.4) with ESMTP id g8429Qt56310; Tue, 3 Sep 2002 19:09:26 -0700 (PDT) (envelope-from marcel@kayak.pn.xcllnt.net) Received: from dhcp01.pn.xcllnt.net (localhost [127.0.0.1]) by dhcp01.pn.xcllnt.net (8.12.5/8.12.5) with ESMTP id g8429sAe028600; Tue, 3 Sep 2002 19:09:55 -0700 (PDT) (envelope-from marcel@dhcp01.pn.xcllnt.net) Received: (from marcel@localhost) by dhcp01.pn.xcllnt.net (8.12.5/8.12.5/Submit) id g8429riq028588; Tue, 3 Sep 2002 19:09:53 -0700 (PDT) (envelope-from marcel) Date: Tue, 3 Sep 2002 19:09:52 -0700 From: Marcel Moolenaar To: Duncan Barclay Cc: emulation@FreeBSD.org Subject: Re: TIOCSCTTY not implemented in linuxulator? Message-ID: <20020904020952.GB7157@dhcp01.pn.xcllnt.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.1i Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org [moved to -emulation] On Tue, Sep 03, 2002 at 10:49:17PM +0100, Duncan Barclay wrote: > > Does anyone know why TIOCSCTTY isn't implemented in compat/linux_ioctl.c? There was no immediate need for it. Please file a CR and I'm sure someone will find the time to implement it. HTH, -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message From owner-freebsd-emulation Wed Sep 4 0:39: 2 2002 Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6490E37B400 for ; Wed, 4 Sep 2002 00:39:00 -0700 (PDT) Received: from birch.ripe.net (birch.ripe.net [193.0.1.96]) by mx1.FreeBSD.org (Postfix) with ESMTP id 66C7343E3B for ; Wed, 4 Sep 2002 00:38:59 -0700 (PDT) (envelope-from marks@ripe.net) Received: from laptop.6bone.nl (cow.ripe.net [193.0.1.239]) by birch.ripe.net (8.12.5/8.11.6) with SMTP id g847cvEs006813; Wed, 4 Sep 2002 09:38:57 +0200 Received: (nullmailer pid 960 invoked by uid 1000); Wed, 04 Sep 2002 06:46:21 -0000 Date: Wed, 4 Sep 2002 08:46:20 +0200 From: Mark Santcroos To: Duncan Barclay Cc: emulation@FreeBSD.ORG Subject: Re: TIOCSCTTY not implemented in linuxulator? Message-ID: <20020904064620.GA713@laptop.6bone.nl> References: <20020904020952.GB7157@dhcp01.pn.xcllnt.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020904020952.GB7157@dhcp01.pn.xcllnt.net> User-Agent: Mutt/1.4i X-Handles: MS6-6BONE, MS18417-RIPE X-RIPE-Spam-Status: NONE ; -1035 X-RIPE-Spam-Level: Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Hi Duncan, Can you find out (ktrace) to which devices it is sending these ioctls? Thanks Mark On Tue, Sep 03, 2002 at 07:09:52PM -0700, Marcel Moolenaar wrote: > [moved to -emulation] > > On Tue, Sep 03, 2002 at 10:49:17PM +0100, Duncan Barclay wrote: > > > > Does anyone know why TIOCSCTTY isn't implemented in compat/linux_ioctl.c? > > There was no immediate need for it. Please file a CR and I'm sure > someone will find the time to implement it. > > HTH, > > -- > Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-emulation" in the body of the message -- Mark Santcroos RIPE Network Coordination Centre http://www.ripe.net/home/mark/ New Projects Group/TTM To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message From owner-freebsd-emulation Wed Sep 4 2:39:16 2002 Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F309837B401 for ; Wed, 4 Sep 2002 02:39:13 -0700 (PDT) Received: from mailgate2.Cadence.COM (mailgate2.Cadence.COM [158.140.2.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7DD2643E65 for ; Wed, 4 Sep 2002 02:39:13 -0700 (PDT) (envelope-from dmlb@dmlb.org) Received: from exmbx01camb.global.cadence.com (exmbx01camb.Cadence.COM [194.32.100.67]) by mailgate2.Cadence.COM (8.9.3/8.9.3) with ESMTP id CAA00509; Wed, 4 Sep 2002 02:39:10 -0700 (PDT) Received: from pc598cam ([194.32.96.109]) by exmbx01camb.global.cadence.com with Microsoft SMTPSVC(5.0.2195.5329); Wed, 4 Sep 2002 10:41:03 +0100 Message-ID: <000801c253f7$2cae8ea0$6d6020c2@pc598cam> From: "Duncan Barclay" To: "Mark Santcroos" Cc: References: <20020904020952.GB7157@dhcp01.pn.xcllnt.net> <20020904064620.GA713@laptop.6bone.nl> Subject: Re: TIOCSCTTY not implemented in linuxulator? Date: Wed, 4 Sep 2002 10:40:58 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-OriginalArrivalTime: 04 Sep 2002 09:41:03.0648 (UTC) FILETIME=[2F5D8200:01C253F7] X-Received: By mailgate2.Cadence.COM as CAA00509 at Wed Sep 4 02:39:10 2002 Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org > Hi Duncan, > > Can you find out (ktrace) to which devices it is sending these ioctls? It's the tty side of a pty/ttp pair. Matlab spawns a subprocess, and it's the subprocess that issues these ioctls. Duncan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message From owner-freebsd-emulation Wed Sep 4 3:44:48 2002 Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4267C37B400 for ; Wed, 4 Sep 2002 03:44:45 -0700 (PDT) Received: from mailgate.Cadence.COM (mailgate.Cadence.COM [158.140.2.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id D84CA43E6E for ; Wed, 4 Sep 2002 03:44:44 -0700 (PDT) (envelope-from dmlb@dmlb.org) Received: from exmbx01camb.global.cadence.com (exmbx01camb.Cadence.COM [194.32.100.67]) by mailgate.Cadence.COM (8.9.3/8.9.3) with ESMTP id DAA06768; Wed, 4 Sep 2002 03:43:33 -0700 (PDT) Received: from pc598cam ([194.32.96.109]) by exmbx01camb.global.cadence.com with Microsoft SMTPSVC(5.0.2195.5329); Wed, 4 Sep 2002 11:45:27 +0100 Message-ID: <001601c25400$2b8a6ae0$6d6020c2@pc598cam> From: "Duncan Barclay" To: "Marcel Moolenaar" Cc: References: <20020904020952.GB7157@dhcp01.pn.xcllnt.net> Subject: Re: TIOCSCTTY not implemented in linuxulator? Date: Wed, 4 Sep 2002 11:45:22 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-OriginalArrivalTime: 04 Sep 2002 10:45:27.0273 (UTC) FILETIME=[2E43E590:01C25400] X-Received: By mailgate.Cadence.COM as DAA06768 at Wed Sep 4 03:43:33 2002 Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org > [moved to -emulation] > > On Tue, Sep 03, 2002 at 10:49:17PM +0100, Duncan Barclay wrote: > > > > Does anyone know why TIOCSCTTY isn't implemented in compat/linux_ioctl.c? > > There was no immediate need for it. Please file a CR and I'm sure > someone will find the time to implement it. PR filed, kern/42404 Is this enough? If it is I can add it. case LINUX_TIOCSCTTY: args->cmd = TIOCSCTTY; return (ioctl(p, (struct ioctl_args *)args)); (I know nothing about kernel handling of controlling terminals..). > HTH, > > -- > Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net > ________________________________________________________________________ Duncan Barclay | God smiles upon the little children, dmlb@dmlb.org | the alcoholics, and the permanently stoned. dmlb@freebsd.org| Steven King ________________________________________________________________________ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message From owner-freebsd-emulation Wed Sep 4 3:57: 3 2002 Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B5F3037B400 for ; Wed, 4 Sep 2002 03:57:01 -0700 (PDT) Received: from Daffy.timing.com (daffy.timing.com [206.168.13.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1733A43E42 for ; Wed, 4 Sep 2002 03:57:01 -0700 (PDT) (envelope-from jhein@timing.com) Received: from brain.timing.com (brain.timing.com [206.168.13.195]) by Daffy.timing.com (8.11.3/8.11.3) with ESMTP id g84AuvK48920; Wed, 4 Sep 2002 04:56:57 -0600 (MDT) (envelope-from jhein@timing.com) Received: from brain.timing.com (localhost [127.0.0.1]) by brain.timing.com (8.12.2/8.12.2) with ESMTP id g84Aurcq080269; Wed, 4 Sep 2002 04:56:53 -0600 (MDT) (envelope-from jhein@brain.timing.com) Received: (from jhein@localhost) by brain.timing.com (8.12.2/8.12.2/Submit) id g84AunV0080266; Wed, 4 Sep 2002 04:56:49 -0600 (MDT) (envelope-from jhein) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15733.59121.143526.699051@brain.timing.com> Date: Wed, 4 Sep 2002 04:56:49 -0600 From: John E Hein To: "Duncan Barclay" Cc: "Mark Santcroos" , Subject: Re: TIOCSCTTY not implemented in linuxulator? In-Reply-To: <000801c253f7$2cae8ea0$6d6020c2@pc598cam> References: <20020904020952.GB7157@dhcp01.pn.xcllnt.net> <20020904064620.GA713@laptop.6bone.nl> <000801c253f7$2cae8ea0$6d6020c2@pc598cam> X-Mailer: VM 7.03 under Emacs 21.1.1 Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Duncan Barclay wrote at 10:40 +0100 on Sep 4: > > Hi Duncan, > > > > Can you find out (ktrace) to which devices it is sending these ioctls? > > It's the tty side of a pty/ttp pair. Matlab spawns a subprocess, and it's > the subprocess that issues these ioctls. See this freebsd-emulation thread ("can't quit matlab"): http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&frame=right&th=206ec3e38e06e5d2&seekm=15218.39637.311548.512594_localhost.econ.vt.edu%40ns.sol.net#link1 Note that the 540e is TIOCSCTTY: /usr/src/linux-2.2.19/include/asm-i386/ioctls.h:#define TIOCSCTTY 0x540E Particularly look at the 3rd message in the thread that talks about the /dev/ptmx workaround and unix98 ptys. If someone could solve this, it'd be great. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message From owner-freebsd-emulation Wed Sep 4 4: 9:29 2002 Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3EAA737B400 for ; Wed, 4 Sep 2002 04:09:25 -0700 (PDT) Received: from mailgate.Cadence.COM (mailgate.Cadence.COM [158.140.2.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id C0DB743E42 for ; Wed, 4 Sep 2002 04:09:24 -0700 (PDT) (envelope-from dmlb@dmlb.org) Received: from exmbx01camb.global.cadence.com (exmbx01camb.Cadence.COM [194.32.100.67]) by mailgate.Cadence.COM (8.9.3/8.9.3) with ESMTP id EAA10632; Wed, 4 Sep 2002 04:09:21 -0700 (PDT) Received: from pc598cam ([194.32.96.109]) by exmbx01camb.global.cadence.com with Microsoft SMTPSVC(5.0.2195.5329); Wed, 4 Sep 2002 12:11:15 +0100 Message-ID: <001b01c25403$c65353e0$6d6020c2@pc598cam> From: "Duncan Barclay" To: "John E Hein" Cc: "Mark Santcroos" , References: <20020904020952.GB7157@dhcp01.pn.xcllnt.net><20020904064620.GA713@laptop.6bone.nl><000801c253f7$2cae8ea0$6d6020c2@pc598cam> <15733.59121.143526.699051@brain.timing.com> Subject: Re: TIOCSCTTY not implemented in linuxulator? Date: Wed, 4 Sep 2002 12:11:10 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-OriginalArrivalTime: 04 Sep 2002 11:11:15.0492 (UTC) FILETIME=[C9135E40:01C25403] X-Received: By mailgate.Cadence.COM as EAA10632 at Wed Sep 4 04:09:21 2002 Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org From: "John E Hein" Sent: Wednesday, September 04, 2002 11:56 AM [sorry about quoting/format, using outlook at ${REALJOB}] > Duncan Barclay wrote at 10:40 +0100 on Sep 4: > > > Hi Duncan, > > > > > > Can you find out (ktrace) to which devices it is sending these ioctls? > > > > It's the tty side of a pty/ttp pair. Matlab spawns a subprocess, and it's > > the subprocess that issues these ioctls. > > See this freebsd-emulation thread ("can't quit matlab"): > http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&frame=right&th=2 06ec3e38e06e5d2&seekm=15218.39637.311548.512594_localhost.econ.vt.edu%40ns.s ol.net#link1 > > Note that the 540e is TIOCSCTTY: > > /usr/src/linux-2.2.19/include/asm-i386/ioctls.h:#define TIOCSCTTY 0x540E > > Particularly look at the 3rd message in the thread that talks about the > /dev/ptmx workaround and unix98 ptys. > If someone could solve this, it'd be great. > Yup, this is the problem I'm trying to solve. Exiting without using the /dev/ptmx problem. ktrace output on spawned matlab process. 54357 matlab_helper NAMI "/compat/linux/dev/ttyp2" 54357 matlab_helper NAMI "/dev/ttyp2" 54357 matlab_helper RET linux_newstat 0 54357 matlab_helper CALL setsid 54357 matlab_helper RET setsid 54357/0xd455 54357 matlab_helper CALL linux_open(0xbfbfed58,0x2,0x60) 54357 matlab_helper NAMI "/compat/linux/dev/ttyp2" 54357 matlab_helper NAMI "/dev/ttyp2" 54357 matlab_helper RET linux_open 4 54357 matlab_helper CALL linux_ioctl(0x4,TIOCSER_TEMT,0x8049362) 54357 matlab_helper RET linux_ioctl -1 errno 22 Invalid argument 54357 matlab_helper CALL linux_ioctl(0x4,TIOCSER_TEMT,0x8049367) 54357 matlab_helper RET linux_ioctl -1 errno 22 Invalid argument 54357 matlab_helper CALL linux_ioctl(0x4,TIOCSCTTY,0x8049362) 54357 matlab_helper RET linux_ioctl -1 errno 22 Invalid argument 54357 matlab_helper CALL getpgrp 54357 matlab_helper RET getpgrp 54357/0xd455 54357 matlab_helper CALL linux_ioctl(0x4,TIOCSPGRP,0xbfbfecb4) 54357 matlab_helper RET linux_ioctl 0 54357 matlab_helper CALL read(0,0xbfbfecfc,0x4) [end of trace] Trying to quit matlab causes it to hang, kill -9 works. If I start matlab with /usr/local/bin/matlab -glnx86 -nosplash -nodesktop so I get matlab running in a terminal, after the kill -9, the terminal doesn't receive keyboard input. Adding case LINUX_TIOCSCTTY: args->cmd = TIOCSCTTY; return (ioctl(p, (struct ioctl_args *)args)); to /sys/compat/linux/linux_ioctl.h, correctly restores the terminal but does not fix the exit problem itself. i.e. kill -9 is still needed. Duncan ________________________________________________________________________ Duncan Barclay | God smiles upon the little children, dmlb@dmlb.org | the alcoholics, and the permanently stoned. dmlb@freebsd.org| Steven King ________________________________________________________________________ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message From owner-freebsd-emulation Wed Sep 4 19:52:13 2002 Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9248237B401 for ; Wed, 4 Sep 2002 19:52:06 -0700 (PDT) Received: from kayak.xcllnt.net (209-128-86-226.bayarea.net [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id D0F7C43E42 for ; Wed, 4 Sep 2002 19:52:05 -0700 (PDT) (envelope-from marcel@xcllnt.net) Received: from dhcp01.pn.xcllnt.net (dhcp01.pn.xcllnt.net [192.168.4.201]) by kayak.xcllnt.net (8.11.6/8.11.4) with ESMTP id g852p8t59343; Wed, 4 Sep 2002 19:51:08 -0700 (PDT) (envelope-from marcel@kayak.pn.xcllnt.net) Received: from dhcp01.pn.xcllnt.net (localhost [127.0.0.1]) by dhcp01.pn.xcllnt.net (8.12.6/8.12.6) with ESMTP id g852paEu006427; Wed, 4 Sep 2002 19:51:36 -0700 (PDT) (envelope-from marcel@dhcp01.pn.xcllnt.net) Received: (from marcel@localhost) by dhcp01.pn.xcllnt.net (8.12.6/8.12.6/Submit) id g852pVl9006426; Wed, 4 Sep 2002 19:51:31 -0700 (PDT) Date: Wed, 4 Sep 2002 19:51:30 -0700 From: Marcel Moolenaar To: Duncan Barclay Cc: emulation@FreeBSD.org Subject: Re: TIOCSCTTY not implemented in linuxulator? Message-ID: <20020905025130.GA4286@dhcp01.pn.xcllnt.net> References: <20020904020952.GB7157@dhcp01.pn.xcllnt.net> <001601c25400$2b8a6ae0$6d6020c2@pc598cam> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <001601c25400$2b8a6ae0$6d6020c2@pc598cam> User-Agent: Mutt/1.5.1i Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Wed, Sep 04, 2002 at 11:45:22AM +0100, Duncan Barclay wrote: > > > > There was no immediate need for it. Please file a CR and I'm sure > > someone will find the time to implement it. > > PR filed, kern/42404 > Is this enough? If it is I can add it. > > case LINUX_TIOCSCTTY: > args->cmd = TIOCSCTTY; > return (ioctl(p, (struct ioctl_args *)args)); Yes, that's it. I committed the version for -current. Do you want me to ping re@ for inclusion in -stable? -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message From owner-freebsd-emulation Thu Sep 5 2:31:32 2002 Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5C11F37B40B for ; Thu, 5 Sep 2002 02:31:29 -0700 (PDT) Received: from dmlb.org (pc1-cmbg2-6-cust106.cam.cable.ntl.com [80.4.4.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id DEDFC43E42 for ; Thu, 5 Sep 2002 02:31:28 -0700 (PDT) (envelope-from dmlb@dmlb.org) Received: from slave.my.domain ([192.168.200.39]) by dmlb.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 3.36 #1) id 17msys-000CyO-00; Thu, 05 Sep 2002 10:31:19 +0100 Received: from dmlb by slave.my.domain with local (Exim 3.36 #1) id 17msys-0000tU-00; Thu, 05 Sep 2002 10:31:18 +0100 Message-ID: X-Mailer: XFMail 1.5.2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20020905025130.GA4286@dhcp01.pn.xcllnt.net> Date: Thu, 05 Sep 2002 10:31:18 +0100 (BST) From: Duncan Barclay To: Marcel Moolenaar Subject: Re: TIOCSCTTY not implemented in linuxulator? Cc: emulation@FreeBSD.org Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On 05-Sep-2002 Marcel Moolenaar wrote: > On Wed, Sep 04, 2002 at 11:45:22AM +0100, Duncan Barclay wrote: >> > >> > There was no immediate need for it. Please file a CR and I'm sure >> > someone will find the time to implement it. >> >> PR filed, kern/42404 >> Is this enough? If it is I can add it. >> >> case LINUX_TIOCSCTTY: >> args->cmd = TIOCSCTTY; >> return (ioctl(p, (struct ioctl_args *)args)); > > Yes, that's it. I committed the version for -current. Do you want me to > ping re@ for inclusion in -stable? Yes please, unfortunately it only helps a little with the matlab thing. I'm still trying to track that one down. Did you close the PR? Or shall I? > -- > Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net > -- ________________________________________________________________________ Duncan Barclay | God smiles upon the little children, dmlb@dmlb.org | the alcoholics, and the permanently stoned. dmlb@freebsd.org| Steven King To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message From owner-freebsd-emulation Thu Sep 5 9:29: 7 2002 Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9D0AA37B400 for ; Thu, 5 Sep 2002 09:29:04 -0700 (PDT) Received: from kayak.xcllnt.net (209-128-86-226.BAYAREA.NET [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8360743E6E for ; Thu, 5 Sep 2002 09:29:03 -0700 (PDT) (envelope-from marcel@xcllnt.net) Received: from dhcp01.pn.xcllnt.net (dhcp01.pn.xcllnt.net [192.168.4.201]) by kayak.xcllnt.net (8.11.6/8.11.4) with ESMTP id g85GSxt60994; Thu, 5 Sep 2002 09:29:00 -0700 (PDT) (envelope-from marcel@kayak.pn.xcllnt.net) Received: from dhcp01.pn.xcllnt.net (localhost [127.0.0.1]) by dhcp01.pn.xcllnt.net (8.12.6/8.12.6) with ESMTP id g85GTUJD000810; Thu, 5 Sep 2002 09:29:30 -0700 (PDT) (envelope-from marcel@dhcp01.pn.xcllnt.net) Received: (from marcel@localhost) by dhcp01.pn.xcllnt.net (8.12.6/8.12.6/Submit) id g85GTUV2000809; Thu, 5 Sep 2002 09:29:30 -0700 (PDT) Date: Thu, 5 Sep 2002 09:29:30 -0700 From: Marcel Moolenaar To: Duncan Barclay Cc: emulation@FreeBSD.org Subject: Re: TIOCSCTTY not implemented in linuxulator? Message-ID: <20020905162929.GA779@dhcp01.pn.xcllnt.net> References: <20020905025130.GA4286@dhcp01.pn.xcllnt.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.1i Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Thu, Sep 05, 2002 at 10:31:18AM +0100, Duncan Barclay wrote: > > >> PR filed, kern/42404 > >> Is this enough? If it is I can add it. > >> > >> case LINUX_TIOCSCTTY: > >> args->cmd = TIOCSCTTY; > >> return (ioctl(p, (struct ioctl_args *)args)); > > > > Yes, that's it. I committed the version for -current. Do you want me to > > ping re@ for inclusion in -stable? > > Yes please, unfortunately it only helps a little with the matlab > thing. I'm still trying to track that one down. Oh, ok. In that case, I don't see much value to MFC it during a freeze. I'd rather bug re@ if we really improved the quality or usability... > Did you close the PR? Or shall I? I didn't close the PR yet, because the change is not in -stable yet. Feel free to close it if you're on top of it. I'll assign the PR to me as to avoid it staying open for months, in the event that you leave it open as well... If you found out something new WRT matlab, let me know, -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message From owner-freebsd-emulation Thu Sep 5 9:44:10 2002 Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9A1AE37B400 for ; Thu, 5 Sep 2002 09:44:06 -0700 (PDT) Received: from dmlb.org (pc1-cmbg2-6-cust106.cam.cable.ntl.com [80.4.4.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 23E9643E42 for ; Thu, 5 Sep 2002 09:44:06 -0700 (PDT) (envelope-from dmlb@dmlb.org) Received: from slave.my.domain ([192.168.200.39]) by dmlb.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 3.36 #1) id 17mzja-000DHE-00; Thu, 05 Sep 2002 17:43:58 +0100 Received: from dmlb by slave.my.domain with local (Exim 3.36 #1) id 17mzjZ-0001VF-00; Thu, 05 Sep 2002 17:43:57 +0100 Message-ID: X-Mailer: XFMail 1.5.2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20020905162929.GA779@dhcp01.pn.xcllnt.net> Date: Thu, 05 Sep 2002 17:43:57 +0100 (BST) From: Duncan Barclay To: Marcel Moolenaar Subject: Re: TIOCSCTTY not implemented in linuxulator? Cc: emulation@FreeBSD.org Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On 05-Sep-2002 Marcel Moolenaar wrote: > On Thu, Sep 05, 2002 at 10:31:18AM +0100, Duncan Barclay wrote: >> >> >> PR filed, kern/42404 >> >> Is this enough? If it is I can add it. >> >> >> >> case LINUX_TIOCSCTTY: >> >> args->cmd = TIOCSCTTY; >> >> return (ioctl(p, (struct ioctl_args *)args)); >> > >> > Yes, that's it. I committed the version for -current. Do you want me to >> > ping re@ for inclusion in -stable? >> >> Yes please, unfortunately it only helps a little with the matlab >> thing. I'm still trying to track that one down. > > Oh, ok. In that case, I don't see much value to MFC it during a freeze. > I'd rather bug re@ if we really improved the quality or usability... Agreed, as it only helps a little lets MFC after 4.7 >> Did you close the PR? Or shall I? > > I didn't close the PR yet, because the change is not in -stable yet. > Feel free to close it if you're on top of it. I'll assign the PR to > me as to avoid it staying open for months, in the event that you leave > it open as well... okay > If you found out something new WRT matlab, let me know, I have just discovered that if you start matlab without the Jave VM running it exits cleanly: slave$ /ide3.g/matlab6p1/bin/matlab -glnx86 -nosplash -nojvm < M A T L A B > Copyright 1984-2001 The MathWorks, Inc. Version 6.1.0.1989a Release 12.1 Oct 5 2001 To get started, type one of these: helpwin, helpdesk, or demo. For product information, visit www.mathworks.com. >> plot(1,2) >> exit slave$ ls kdump_matlab ktrace_matlab_helper.out kdump_matlab_helper noX11/ ktrace_matlab.out This is _without_ the TIOCSCTTY patch. Will dig a bit more, but I have already noticed that matlab -nojvm doesn't spawn any threads. However, with the JVM about four or five threads are created. I suspect something is broken in the killing of threads. Duncan -- ________________________________________________________________________ Duncan Barclay | God smiles upon the little children, dmlb@dmlb.org | the alcoholics, and the permanently stoned. dmlb@freebsd.org| Steven King To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message From owner-freebsd-emulation Thu Sep 5 9:48:45 2002 Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5F9E037B400 for ; Thu, 5 Sep 2002 09:48:43 -0700 (PDT) Received: from dmlb.org (pc1-cmbg2-6-cust106.cam.cable.ntl.com [80.4.4.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id D98FA43E4A for ; Thu, 5 Sep 2002 09:48:42 -0700 (PDT) (envelope-from dmlb@dmlb.org) Received: from slave.my.domain ([192.168.200.39]) by dmlb.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 3.36 #1) id 17mzoA-000DHb-00 for emulation@freebsd.org; Thu, 05 Sep 2002 17:48:42 +0100 Received: from dmlb by slave.my.domain with local (Exim 3.36 #1) id 17mzoA-0001VO-00 for emulation@freebsd.org; Thu, 05 Sep 2002 17:48:42 +0100 Message-ID: X-Mailer: XFMail 1.5.2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 Date: Thu, 05 Sep 2002 17:48:42 +0100 (BST) From: Duncan Barclay To: emulation@freebsd.org Subject: matlab users - workaround for exit problem Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Hi I've been doing a bit of digging on the problem with matlab hanging on exit. It appears to be related to the Java Virtual Machine. If you do not use the desktop or matlab IDE, then starting matlab with -nojvm allows clean exits. You do not need a fake /dev/ptmx either. I am using R12.1 but people with R12 have seen this. I am doing some more digging to try and trace the real problem. See the thread "TIOCSCTTY not implemented in linuxulator" for more info. Duncan PS. Please keep me on CC: list as I am not subscribed. -- ________________________________________________________________________ Duncan Barclay | God smiles upon the little children, dmlb@dmlb.org | the alcoholics, and the permanently stoned. dmlb@freebsd.org| Steven King To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message From owner-freebsd-emulation Thu Sep 5 11:40:46 2002 Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A75F137B400 for ; Thu, 5 Sep 2002 11:40:42 -0700 (PDT) Received: from dmlb.org (pc1-cmbg2-6-cust106.cam.cable.ntl.com [80.4.4.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2FF4943E3B for ; Thu, 5 Sep 2002 11:40:42 -0700 (PDT) (envelope-from dmlb@dmlb.org) Received: from slave.my.domain ([192.168.200.39]) by dmlb.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 3.36 #1) id 17n1YQ-000DOm-00; Thu, 05 Sep 2002 19:40:34 +0100 Received: from dmlb by slave.my.domain with local (Exim 3.36 #1) id 17n1YP-0001yp-00; Thu, 05 Sep 2002 19:40:33 +0100 Message-ID: X-Mailer: XFMail 1.5.2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: Date: Thu, 05 Sep 2002 19:40:33 +0100 (BST) From: Duncan Barclay To: Marcel Moolenaar Subject: Re: TIOCSCTTY not implemented in linuxulator? Cc: emulation@FreeBSD.org Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On 05-Sep-2002 Duncan Barclay wrote: > > On 05-Sep-2002 Marcel Moolenaar wrote: >> On Thu, Sep 05, 2002 at 10:31:18AM +0100, Duncan Barclay wrote: > > Will dig a bit more, but I have already noticed that matlab -nojvm > doesn't spawn any threads. However, with the JVM about four or five > threads are created. I suspect something is broken in the killing of > threads. This does indeed seem to tbe the case. With the JVM running, matlab spawns a thread tree like this: PID 6255 (0x186f) matlab programme 6303 (0x189f) matlab_helper - real programme 6304 (0x18a0) jvm, sibling thread of 6255 6305 (0x18a1) jvm, sibling thread of 6304 6306 (0x18a2) jvm, sibling thread of 6304 6307 (0x18a3) jvm, sibling thread of 6304 When the command "exit" is typed at the matlab propmt, the sibling threads are all killed with signal 0x21 by the jvm parent pid=6304. This thread reaps the children with wait4 and options of 0x80000000 (WLINUXCLONE). ktrace then tells us: jvm parent kill itself and exits 6304 matlab RET linux_kill 0 6304 matlab CALL exit(0) matlab notices that the JVM dies, 6255 matlab RET linux_rt_sigsuspend -1 errno 4 Interrupted system call 6255 matlab PSIG SIGCHLD caught handler=0x28c97460 mask=0x80000000 code=0 x0 matlab parent tries to reap any dead children, with no options. this call never returns 6255 matlab CALL linux_wait4(0xffffffff,0xbfbfa1b0,0,0) At this point ps shows PGID PID PPID WCHAN STAT TT TIME COMMAND 6255 6255 5319 wait I+ p1 0:00.93 /ide3.g/matlab6p1/bin/glnx86/matlab 6255 6404 6255 - Z+ p1 0:00.00 (matlab) and a kill -9 is needed. Should the wait4 by pid=6255 actually have the WCLONE option set? It is reaping a cloned process. Duncan -- ________________________________________________________________________ Duncan Barclay | God smiles upon the little children, dmlb@dmlb.org | the alcoholics, and the permanently stoned. dmlb@freebsd.org| Steven King To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message From owner-freebsd-emulation Thu Sep 5 13:56: 8 2002 Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8846B37B400 for ; Thu, 5 Sep 2002 13:56:06 -0700 (PDT) Received: from dmlb.org (pc1-cmbg2-6-cust106.cam.cable.ntl.com [80.4.4.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 920A743E6E for ; Thu, 5 Sep 2002 13:56:05 -0700 (PDT) (envelope-from dmlb@dmlb.org) Received: from slave.my.domain ([192.168.200.39]) by dmlb.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 3.36 #1) id 17n3fR-000DX5-00; Thu, 05 Sep 2002 21:55:57 +0100 Received: from dmlb by slave.my.domain with local (Exim 3.36 #1) id 17n3fQ-0000Sr-00; Thu, 05 Sep 2002 21:55:56 +0100 Message-ID: X-Mailer: XFMail 1.5.2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: Date: Thu, 05 Sep 2002 21:55:56 +0100 (BST) From: Duncan Barclay To: Marcel Moolenaar Subject: fix for Linux matlab exit behaviour - problem with linux_clone(2 Cc: emulation@FreeBSD.org Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Please review the following PR for a hack to let matlab exit. http://www.freebsd.org/cgi/query-pr.cgi?pr=42457 The code in PR is deliberatly not a patch because it is not the right way to cleanly fix the problem. The problem is that we do not fully emulate all of linux_clone(2) behaviour, in particular, linux_clone(2) allows a thread to not send a signal to its parent on exit. /sys/kern_exit.c does not allow this and will send a specified signal or SIGCHLD. Matlab has a SIGCHLD handler that does not reap threads. If the SIGCHLD is not sent, matlab reaps its last thread and exits cleanly. This has been tested on 4.6-PRE, with Matlab Release 12.1. Duncan -- ________________________________________________________________________ Duncan Barclay | God smiles upon the little children, dmlb@dmlb.org | the alcoholics, and the permanently stoned. dmlb@freebsd.org| Steven King To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message From owner-freebsd-emulation Thu Sep 5 14: 7:29 2002 Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4C5BC37B400 for ; Thu, 5 Sep 2002 14:07:28 -0700 (PDT) Received: from Daffy.timing.com (daffy.timing.com [206.168.13.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id A6D3143E3B for ; Thu, 5 Sep 2002 14:07:27 -0700 (PDT) (envelope-from jhein@timing.com) Received: from brain.timing.com (brain.timing.com [206.168.13.195]) by Daffy.timing.com (8.11.3/8.11.3) with ESMTP id g85L7OK70129; Thu, 5 Sep 2002 15:07:24 -0600 (MDT) (envelope-from jhein@timing.com) Received: from brain.timing.com (localhost [127.0.0.1]) by brain.timing.com (8.12.2/8.12.2) with ESMTP id g85L7Ncq072098; Thu, 5 Sep 2002 15:07:23 -0600 (MDT) (envelope-from jhein@brain.timing.com) Received: (from jhein@localhost) by brain.timing.com (8.12.2/8.12.2/Submit) id g85L7NMf072095; Thu, 5 Sep 2002 15:07:23 -0600 (MDT) (envelope-from jhein) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15735.51083.489854.267762@brain.timing.com> Date: Thu, 5 Sep 2002 15:07:23 -0600 From: John E Hein To: Duncan Barclay Cc: emulation@FreeBSD.ORG Subject: fix for Linux matlab exit behaviour - problem with linux_clone(2 In-Reply-To: References: X-Mailer: VM 7.03 under Emacs 21.1.1 Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Duncan Barclay wrote at 21:55 +0100 on Sep 5: > Please review the following PR for a hack to let matlab exit. > > http://www.freebsd.org/cgi/query-pr.cgi?pr=42457 > > The code in PR is deliberatly not a patch because it is not the right way > to cleanly fix the problem. > > The problem is that we do not fully emulate all of linux_clone(2) behaviour, > in particular, linux_clone(2) allows a thread to not send a signal to > its parent on exit. /sys/kern_exit.c does not allow this and will > send a specified signal or SIGCHLD. Matlab has a SIGCHLD handler that > does not reap threads. If the SIGCHLD is not sent, matlab reaps its last > thread and exits cleanly. Interesting... so why then does the /dev/ptmx -> /dev/null hack allow us to exit matlab? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message From owner-freebsd-emulation Thu Sep 5 14:13:47 2002 Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CDE8E37B401 for ; Thu, 5 Sep 2002 14:13:44 -0700 (PDT) Received: from kayak.xcllnt.net (209-128-86-226.BAYAREA.NET [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id F06F643E6E for ; Thu, 5 Sep 2002 14:13:43 -0700 (PDT) (envelope-from marcel@xcllnt.net) Received: from athlon.pn.xcllnt.net (athlon.pn.xcllnt.net [192.168.4.3]) by kayak.xcllnt.net (8.11.6/8.11.4) with ESMTP id g85LDet61868; Thu, 5 Sep 2002 14:13:40 -0700 (PDT) (envelope-from marcel@kayak.pn.xcllnt.net) Received: from athlon.pn.xcllnt.net (localhost [127.0.0.1]) by athlon.pn.xcllnt.net (8.12.6/8.12.6) with ESMTP id g85LDejr006659; Thu, 5 Sep 2002 14:13:40 -0700 (PDT) (envelope-from marcel@athlon.pn.xcllnt.net) Received: (from marcel@localhost) by athlon.pn.xcllnt.net (8.12.6/8.12.6/Submit) id g85LDewM006658; Thu, 5 Sep 2002 14:13:40 -0700 (PDT) Date: Thu, 5 Sep 2002 14:13:40 -0700 From: Marcel Moolenaar To: Duncan Barclay Cc: emulation@FreeBSD.org Subject: Re: TIOCSCTTY not implemented in linuxulator? Message-ID: <20020905211340.GA705@athlon.pn.xcllnt.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.1i Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Thu, Sep 05, 2002 at 07:40:33PM +0100, Duncan Barclay wrote: > At this point ps shows > PGID PID PPID WCHAN STAT TT TIME COMMAND > 6255 6255 5319 wait I+ p1 0:00.93 /ide3.g/matlab6p1/bin/glnx86/matlab > 6255 6404 6255 - Z+ p1 0:00.00 (matlab) > and a kill -9 is needed. > > Should the wait4 by pid=6255 actually have the WCLONE option set? It is > reaping a cloned process. I don't think the option is required. Looking in /sys/kern/kern_exit.c (-current sources) where we consume the options I see the following test: if ((p->p_sigparent != SIGCHLD) ^ ((uap->options & WLINUXCLONE) != 0)) { PROC_UNLOCK(p); continue; } For -stable sources this is (reformatted): if ((p->p_sigparent != SIGCHLD) ^ ((uap->options & WLINUXCLONE) != 0)) continue; The equivalent in the Linux kernel is (reformatted): if (((p->exit_signal != SIGCHLD) ^ ((options & __WCLONE) != 0)) && !(options & __WALL)) continue; So, we have a __WALL that can make a difference and guess what we don't promote in the Linuxulator? Can you put a printf() in linux_wait4() so that we can see if __WALL (defined as 0x40000000) is present or not? -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message From owner-freebsd-emulation Thu Sep 5 15: 5:49 2002 Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F410E37B400 for ; Thu, 5 Sep 2002 15:05:45 -0700 (PDT) Received: from dmlb.org (pc1-cmbg2-6-cust106.cam.cable.ntl.com [80.4.4.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3043043E42 for ; Thu, 5 Sep 2002 15:05:45 -0700 (PDT) (envelope-from dmlb@dmlb.org) Received: from slave.my.domain ([192.168.200.39]) by dmlb.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 3.36 #1) id 17n4kr-000DZM-00; Thu, 05 Sep 2002 23:05:37 +0100 Received: from dmlb by slave.my.domain with local (Exim 3.36 #1) id 17n4kq-00008n-00; Thu, 05 Sep 2002 23:05:36 +0100 Message-ID: X-Mailer: XFMail 1.5.2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20020905211340.GA705@athlon.pn.xcllnt.net> Date: Thu, 05 Sep 2002 23:05:36 +0100 (BST) From: Duncan Barclay To: Marcel Moolenaar Subject: Re: TIOCSCTTY not implemented in linuxulator? Cc: emulation@FreeBSD.org Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On 05-Sep-2002 Marcel Moolenaar wrote: > On Thu, Sep 05, 2002 at 07:40:33PM +0100, Duncan Barclay wrote: > >> At this point ps shows >> PGID PID PPID WCHAN STAT TT TIME COMMAND >> 6255 6255 5319 wait I+ p1 0:00.93 >> /ide3.g/matlab6p1/bin/glnx86/matlab >> 6255 6404 6255 - Z+ p1 0:00.00 (matlab) >> and a kill -9 is needed. >> >> Should the wait4 by pid=6255 actually have the WCLONE option set? It is >> reaping a cloned process. Erm, sorry this turns out to be a red herring. Have a look at my later mail. We do not honour the Linux clone(2) signal handling options fully. Take a look at kern_exit lower down, where it signals the parent. > I don't think the option is required. Looking in /sys/kern/kern_exit.c > (-current sources) where we consume the options I see the following test: > > if ((p->p_sigparent != SIGCHLD) ^ > ((uap->options & WLINUXCLONE) != 0)) { > PROC_UNLOCK(p); > continue; > } > > For -stable sources this is (reformatted): > > if ((p->p_sigparent != SIGCHLD) ^ > ((uap->options & WLINUXCLONE) != 0)) > continue; > > The equivalent in the Linux kernel is (reformatted): > > if (((p->exit_signal != SIGCHLD) ^ > ((options & __WCLONE) != 0)) > && !(options & __WALL)) > continue; > > So, we have a __WALL that can make a difference and guess what we don't > promote in the Linuxulator? > > Can you put a printf() in linux_wait4() so that we can see if __WALL > (defined as 0x40000000) is present or not? We don't, I've already checked. However, this would not have made any difference to Matlab in this case. Duncan -- ________________________________________________________________________ Duncan Barclay | God smiles upon the little children, dmlb@dmlb.org | the alcoholics, and the permanently stoned. dmlb@freebsd.org| Steven King To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message From owner-freebsd-emulation Thu Sep 5 15:13: 6 2002 Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5560D37B400 for ; Thu, 5 Sep 2002 15:13:04 -0700 (PDT) Received: from dmlb.org (pc1-cmbg2-6-cust106.cam.cable.ntl.com [80.4.4.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id D709F43E42 for ; Thu, 5 Sep 2002 15:13:03 -0700 (PDT) (envelope-from dmlb@dmlb.org) Received: from slave.my.domain ([192.168.200.39]) by dmlb.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 3.36 #1) id 17n4rv-000DZR-00; Thu, 05 Sep 2002 23:12:56 +0100 Received: from dmlb by slave.my.domain with local (Exim 3.36 #1) id 17n4rv-0000OU-00; Thu, 05 Sep 2002 23:12:55 +0100 Message-ID: X-Mailer: XFMail 1.5.2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <15735.51083.489854.267762@brain.timing.com> Date: Thu, 05 Sep 2002 23:12:55 +0100 (BST) From: Duncan Barclay To: John E Hein Subject: Re: fix for Linux matlab exit behaviour - problem with linux_clo Cc: emulation@FreeBSD.ORG Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On 05-Sep-2002 John E Hein wrote: > Duncan Barclay wrote at 21:55 +0100 on Sep 5: > > Please review the following PR for a hack to let matlab exit. > > > > http://www.freebsd.org/cgi/query-pr.cgi?pr=42457 > > > > The code in PR is deliberatly not a patch because it is not the right way > > to cleanly fix the problem. > > > > The problem is that we do not fully emulate all of linux_clone(2) > behaviour, > > in particular, linux_clone(2) allows a thread to not send a signal to > > its parent on exit. /sys/kern_exit.c does not allow this and will > > send a specified signal or SIGCHLD. Matlab has a SIGCHLD handler that > > does not reap threads. If the SIGCHLD is not sent, matlab reaps its last > > thread and exits cleanly. > > Interesting... so why then does the /dev/ptmx -> /dev/null hack allow > us to exit matlab? > Hmm, I forgot about that hack. I have no idea! Can you get a ktrace of it exiting please, preferably after unsetting DISPLAY so that X11 is turned off. Turning X11 off means that there is less cruft in the ktrace. Otherwise, I'll take a look tomorrow. Duncan -- ________________________________________________________________________ Duncan Barclay | God smiles upon the little children, dmlb@dmlb.org | the alcoholics, and the permanently stoned. dmlb@freebsd.org| Steven King To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message From owner-freebsd-emulation Sat Sep 7 4:16:51 2002 Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1A7EC37B400 for ; Sat, 7 Sep 2002 04:16:48 -0700 (PDT) Received: from veck.ecad.org (veck.ecad.org [209.61.188.208]) by mx1.FreeBSD.org (Postfix) with ESMTP id CB38443E42 for ; Sat, 7 Sep 2002 04:16:47 -0700 (PDT) (envelope-from jev@ecad.org) Received: by veck.ecad.org (Postfix, from userid 1000) id B0733482C99; Sat, 7 Sep 2002 12:17:14 +0100 (IST) Date: Sat, 7 Sep 2002 12:17:14 +0100 From: Jev To: emulation@FreeBSD.ORG Subject: ctrl+break in doscmd Message-ID: <20020907111714.GA75122@ecad.org> Reply-To: emulation@FreeBSD.ORG, jev@ecad.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Hello all, Im running some quickbasic programs in dos, under doscmd, but when I press Ctrl+Break when debugging a program nothing happens (it should return from the executing program to quickbasic). I have tried this on two different machines also with different keymaps, to see if it would work, but with out success. Is this a common problem? Some guidance would be greatly appreciated :) Please cc me on any replies as I am not on the emulation list. Thanks, -Jev -- http://www.ecad.org/~jev/jev.gpg Key fingerprint = 748B 2346 1683 6384 5E8D 4EE3 0807 EADB 999E AB95 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message