From owner-freebsd-hackers@freebsd.org Thu Jul 7 04:52:25 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A8A85B7546D; Thu, 7 Jul 2016 04:52:25 +0000 (UTC) (envelope-from kmacybsd@gmail.com) Received: from mail-io0-x22e.google.com (mail-io0-x22e.google.com [IPv6:2607:f8b0:4001:c06::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6DF22196D; Thu, 7 Jul 2016 04:52:25 +0000 (UTC) (envelope-from kmacybsd@gmail.com) Received: by mail-io0-x22e.google.com with SMTP id i186so11787215iof.1; Wed, 06 Jul 2016 21:52:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc; bh=Qr7zrWnkMf4gX8LnCeEGEl5SSsZupuh3hdIGcY8xfso=; b=szWSVLGT1dtnjhZy5L0sQ669CCPbdpz24VTJg1Sj17NekpzwUxfk4jgMKGPIX6aJ7T JuTX8SWqYrGkqVxdS9cYP5Z3rxr1fnWgoCU+mkis3a7HyWwMZZF8uH9IniIVZuohLuHm nrcEIU8Dy3fuaFjwUK73Jqxr/msX+3x+KHQkkgZ606dsDEwj5mm787Xs8eOFqxkAtZ0y 8tU9NEnOXTxyFfxlVBU77FuGpPVumFdwKHTYDelcX7cqeLfABP/c2W78pMfUumR3jewo zJlqPsBCbt7/OucV57DdK0Wehymuc+EJTtTUcOe73p3L8Rvy7GjwOe8dAjFA+vzRnko4 eq2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc; bh=Qr7zrWnkMf4gX8LnCeEGEl5SSsZupuh3hdIGcY8xfso=; b=JeoNsZwJjDdHP6O9tgEkQp7t2aq+xpMHEztytsZ13XAV6Bxgni3Cvn2cRXlz+XRhG4 ox9GKj780BiKUJ9XucWRVPMPws9mfL7cdayCWEALzC//bJ1Y/Nsl0z9jo6dFILzCKeuA azLXLf61eTK8koat7+gotRl+e6QAjnqqZcdLAbjinWZS6+9o02upwcBGjrY3Ob/5fNpL Vy8Mq4QAGIdk0iRjDy3uelYM0fE8Nzt8Ttp2SdVKlAi0M/YiHbtWVFb1cgWwMNfAejFO Ua34RlaQ5ynnEnnasAGV6YZQ7Oo8Pkg3WSjFrko1zjpsIc05Nu6WslXZxrAF0iicKBmb 4YAQ== X-Gm-Message-State: ALyK8tKzx8zTAYzHFnRqyUZYSu7NjXuneyI9tqFOIrSr3kbtjDuQBlb3kBKKx8caM2nKhNAUIzSXxQ9YaCsLdw== MIME-Version: 1.0 X-Received: by 10.107.162.65 with SMTP id l62mr701724ioe.138.1467867144731; Wed, 06 Jul 2016 21:52:24 -0700 (PDT) Sender: kmacybsd@gmail.com Received: by 10.107.134.218 with HTTP; Wed, 6 Jul 2016 21:52:24 -0700 (PDT) In-Reply-To: <201607070443.u674hsgK007808@gw.catspoiler.org> References: <155c3a25e3f.11fb4143170445.2284890475527649192@nextbsd.org> <201607070443.u674hsgK007808@gw.catspoiler.org> Date: Wed, 6 Jul 2016 21:52:24 -0700 X-Google-Sender-Auth: XwvOobuQKCFHqshmFbpAnOyFxzo Message-ID: Subject: Re: difference in SIGCHLD behavior between Linux and FreeBSD breaks apt From: "K. Macy" To: Don Lewis Cc: "mmacy@nextbsd.org" , "freebsd-current@freebsd.org" , "freebsd-hackers@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.22 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jul 2016 04:52:25 -0000 On Wednesday, July 6, 2016, Don Lewis wrote: > On 6 Jul, Matthew Macy wrote: > > As a first step towards managing linux user space in a chrooted > > /compat/linux, initially for i915 testing with intel gpu tools, later > > on to get widevine and steam to work I'm trying to get apt to work. > > I've fixed a number of issues to date in pseudofs/linprocfs but now > > I'm running in to a bug caused by differences in SIGCHLD handling > > between Linux and FreeBSD. The situation is that apt will spawn dpkg > > and wait on a pipe read. On Linux when dpkg exits the SIGCHLD to apt > > causes a short read on the pipe which lets apt then continue. On > > FreeBSD a SIGCHLD is silently ignored. I've even experimented with > > doing a kill -20 to no effect. > > > > It would be easy enough to check sysvec against linux in pipe_read and > > break out of the loop when it's awakened from msleep (assuming there > > aren't deeper issues with signal propagation for anything other than > > SIGINT/SIGKILL) and then do a short read. However, I'm assuming that > > anyone who has worked in this area probably has a cleaner solution. > > It shoulds like SA_RESTART is set in sa_flags for SIGCHLD but shouldn't > be in this case. Good point. Thinking more about it, this seems like a bug in FreeBSD. Not a valid behavioral difference. -M > > _______________________________________________ > freebsd-current@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org > " >