unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Threads + pipes = bad?
@ 2003-07-24  7:48 Robert Marlow
  2003-07-24 15:07 ` Robert Marlow
  0 siblings, 1 reply; 4+ messages in thread
From: Robert Marlow @ 2003-07-24  7:48 UTC (permalink / raw)


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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-07-31  8:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-07-24  7:48 Threads + pipes = bad? Robert Marlow
2003-07-24 15:07 ` Robert Marlow
2003-07-28 23:11   ` Kevin Ryde
2003-07-31  8:20     ` Robert Marlow

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).