From owner-freebsd-current Mon Sep 28 14:22:49 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA28165 for freebsd-current-outgoing; Mon, 28 Sep 1998 14:22:49 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from smtp2.erols.com (smtp2.erols.com [207.172.3.235]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id OAA28105 for ; Mon, 28 Sep 1998 14:22:29 -0700 (PDT) (envelope-from shmit@natasya.noc.erols.net) Received: from natasya.noc.erols.net (natasya.noc.erols.net [207.172.25.236]) by smtp2.erols.com (8.8.8/8.8.5) with ESMTP id RAA28685 for ; Mon, 28 Sep 1998 17:22:33 -0400 (EDT) Received: (from shmit@localhost) by natasya.noc.erols.net (8.9.1/8.9.1) id RAA07656 for current@freebsd.org; Mon, 28 Sep 1998 17:22:12 -0400 (EDT) Message-ID: <19980928172212.A307@kublai.com> Date: Mon, 28 Sep 1998 17:22:12 -0400 From: Brian Cully To: current@FreeBSD.ORG Subject: recvfrom and multiple threads. Reply-To: shmit@kublai.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.93.2i X-Sender: If your mailer pays attention to this, it's broken. X-PGP-Info: finger shmit@kublai.com for my public key. Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I've done a little more poking around with my sigwait problem, and found another data point. If you'll recall, my program daemonizes, blocks all signals, opens a socket, spawns off a bunch of worker threads, and the main thread polls the results of sigwait() for user events. Inside of the worker thread, I call recvfrom() on the socket that was spawned in the master thread. That's where things break. If I replace the recvfrom() with a call to sleep() sigwait works just fine, but with the recvfrom() everything gets hosed. Am I wrong in thinking that multiple threads calling recvfrom() on the same socket should work (ala multiple processes calling recvfrom() on the same socket)? -- Brian Cully ``And when one of our comrades was taken prisoner, blindfolded, hung upside-down, shot, and burned, we thought to ourselves, `These are the best experiences of our lives''' -Pathology (Joe Frank, Somewhere Out There) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message