From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Robert Marlow Newsgroups: gmane.lisp.guile.user Subject: Re: Threads + pipes = bad? Date: 24 Jul 2003 23:07:40 +0800 Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Message-ID: <1059059262.564.16.camel@zuul> References: <1059032896.10133.41.camel@helicon> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1059059438 32642 80.91.224.249 (24 Jul 2003 15:10:38 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 24 Jul 2003 15:10:38 +0000 (UTC) Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Thu Jul 24 17:10:36 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19fhiT-0008Lt-00 for ; Thu, 24 Jul 2003 17:09:13 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19fhi3-00038o-UY for guile-user@m.gmane.org; Thu, 24 Jul 2003 11:08:47 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19fhhg-00032S-JS for guile-user@gnu.org; Thu, 24 Jul 2003 11:08:24 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19fhhU-0002l2-3r for guile-user@gnu.org; Thu, 24 Jul 2003 11:08:12 -0400 Original-Received: from adsl-202-89-175-58.arach.net.au ([202.89.175.58] helo=keymaster.bobturf.com.au) by monty-python.gnu.org with esmtp (Exim 4.20) id 19fhhB-0002By-ND for guile-user@gnu.org; Thu, 24 Jul 2003 11:07:54 -0400 Original-Received: from localhost.localdomain (bobstopper@zuul.bobturf.com.au [192.168.153.69]) by keymaster.bobturf.com.au (8.12.3/8.12.3/Debian-6.3) with ESMTP id h6OF7lxG001035 for ; Thu, 24 Jul 2003 23:07:49 +0800 Original-To: guile-user@gnu.org In-Reply-To: <1059032896.10133.41.camel@helicon> X-Mailer: Ximian Evolution 1.0.5 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.user:2100 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:2100 Nevermind, I think I fixed it by calling the function while the mutex was locked. Bummar though; the whole point of using threads was to get procedures like this one working concurrently. I haven't really played with threads before... is there any reason I shouldn't be able to unlock the mutex and _then_ call a procedure with a pipe such as below? I'm guessing the way to speed the processing up without taking it out of the mutex lock is to put the procedure in a separate executable script, yeah? On Thu, 2003-07-24 at 15:48, Robert Marlow wrote: > Hi all > > I'm getting some problems with my use of a pipe within a thread in a > program I'm writing. Platform is Solaris 8. > > Anyway, here's an example of a function I've called from within the > thread: > > (define (email message) > (let* ((address (assoc-ref message 'address)) > (message-text (assoc-ref message 'text)) > (mail-pipe (open-output-pipe (string-append "mailx -s \'" > subject "\' " > address))) > (display message-text mail-pipe) > (close-pipe))) > > > And here's the errors I get: > > In thread: > ERROR: In procedure dup2: > ERROR: Bad file number > > and > > In thread: > ERROR: In procedure waitpid: > ERROR: No child processes > > > Can anyone shed some light on what's happening here? Is there contention > for file descriptors or something? > > TIA > > > -- > Regards, > > Robert Marlow > > > > > > > > _______________________________________________ > Guile-user mailing list > Guile-user@gnu.org > http://mail.gnu.org/mailman/listinfo/guile-user -- Regards, Robert Marlow _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://mail.gnu.org/mailman/listinfo/guile-user