unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* fork pipe dup2 exec
       [not found] <630665159.26184630.1471440950603.JavaMail.yahoo.ref@mail.yahoo.com>
@ 2016-08-17 13:35 ` Tobias Reithmaier
  2016-08-17 13:56   ` Thompson, David
  0 siblings, 1 reply; 4+ messages in thread
From: Tobias Reithmaier @ 2016-08-17 13:35 UTC (permalink / raw)
  To: Guile-devel

[-- Attachment #1: Type: text/plain, Size: 473 bytes --]

Hello,
is there a way to program a Inter Process Communication (IPC) in guile like you do it with the Linux-Libc-API with the combo fork, pipe, dup2 and exec?If you use the popen-module it's not the same because you have to wait until the program has finished.But there are use-cases in that the program doesn't finish. e.g. a server which outputs data every minute.
So can i use the popen-module to control such a server with pipes?Or is there another way?
greetings-tobi

[-- Attachment #2: Type: text/html, Size: 1185 bytes --]

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

* Re: fork pipe dup2 exec
  2016-08-17 13:35 ` fork pipe dup2 exec Tobias Reithmaier
@ 2016-08-17 13:56   ` Thompson, David
  2016-08-17 14:09     ` Chris Vine
  0 siblings, 1 reply; 4+ messages in thread
From: Thompson, David @ 2016-08-17 13:56 UTC (permalink / raw)
  To: Tobias Reithmaier; +Cc: Guile-devel

On Wed, Aug 17, 2016 at 9:35 AM, Tobias Reithmaier <tobi3489@yahoo.de> wrote:
> Hello,
>
> is there a way to program a Inter Process Communication (IPC) in guile like
> you do it with the Linux-Libc-API with the combo fork, pipe, dup2 and exec?
> If you use the popen-module it's not the same because you have to wait until
> the program has finished.
> But there are use-cases in that the program doesn't finish. e.g. a server
> which outputs data every minute.
>
> So can i use the popen-module to control such a server with pipes?
> Or is there another way?

Check out the "POSIX" section of the manual. Fork, dup, and exec are
all available.

- Dave



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

* Re: fork pipe dup2 exec
  2016-08-17 13:56   ` Thompson, David
@ 2016-08-17 14:09     ` Chris Vine
  2016-08-18  9:22       ` Tobias Reithmaier
  0 siblings, 1 reply; 4+ messages in thread
From: Chris Vine @ 2016-08-17 14:09 UTC (permalink / raw)
  To: Guile-devel

On Wed, 17 Aug 2016 09:56:58 -0400
"Thompson, David" <dthompson2@worcester.edu> wrote:
> On Wed, Aug 17, 2016 at 9:35 AM, Tobias Reithmaier
> <tobi3489@yahoo.de> wrote:
> > Hello,
> >
> > is there a way to program a Inter Process Communication (IPC) in
> > guile like you do it with the Linux-Libc-API with the combo fork,
> > pipe, dup2 and exec? If you use the popen-module it's not the same
> > because you have to wait until the program has finished.
> > But there are use-cases in that the program doesn't finish. e.g. a
> > server which outputs data every minute.
> >
> > So can i use the popen-module to control such a server with pipes?
> > Or is there another way?  
> 
> Check out the "POSIX" section of the manual. Fork, dup, and exec are
> all available.

Tobias might also want to consider the run-with-pipe procedure, and the
run-concurrently+ procedure (with tail-call-program), as provided by
guile-lib ( http://www.nongnu.org/guile-lib/doc/ref/os.process/ ).

Tobias looks as if he has posted to the wrong newsgroup.  Follow ups
should I think go to guile-user (but I have not set them).

Chris



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

* Re: fork pipe dup2 exec
  2016-08-17 14:09     ` Chris Vine
@ 2016-08-18  9:22       ` Tobias Reithmaier
  0 siblings, 0 replies; 4+ messages in thread
From: Tobias Reithmaier @ 2016-08-18  9:22 UTC (permalink / raw)
  To: Chris Vine, Guile-devel

[-- Attachment #1: Type: text/plain, Size: 1583 bytes --]

Thank you.
OH! Sorry! I thought this is the only news-group. I'll ask further questions in the guile-user news group.
@Dave The Systemcall pipe isn't in the posix-module. Maybe it's not required. So there are changes it works just with the posix-module.
@Chris Thank you for library. I didn't know that. Looks really useful for me. 

    Chris Vine <chris@cvine.freeserve.co.uk> schrieb am 16:09 Mittwoch, 17.August 2016:
 

 On Wed, 17 Aug 2016 09:56:58 -0400
"Thompson, David" <dthompson2@worcester.edu> wrote:
> On Wed, Aug 17, 2016 at 9:35 AM, Tobias Reithmaier
> <tobi3489@yahoo.de> wrote:
> > Hello,
> >
> > is there a way to program a Inter Process Communication (IPC) in
> > guile like you do it with the Linux-Libc-API with the combo fork,
> > pipe, dup2 and exec? If you use the popen-module it's not the same
> > because you have to wait until the program has finished.
> > But there are use-cases in that the program doesn't finish. e.g. a
> > server which outputs data every minute.
> >
> > So can i use the popen-module to control such a server with pipes?
> > Or is there another way?  
> 
> Check out the "POSIX" section of the manual. Fork, dup, and exec are
> all available.

Tobias might also want to consider the run-with-pipe procedure, and the
run-concurrently+ procedure (with tail-call-program), as provided by
guile-lib ( http://www.nongnu.org/guile-lib/doc/ref/os.process/ ).

Tobias looks as if he has posted to the wrong newsgroup.  Follow ups
should I think go to guile-user (but I have not set them).

Chris



  

[-- Attachment #2: Type: text/html, Size: 3803 bytes --]

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

end of thread, other threads:[~2016-08-18  9:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <630665159.26184630.1471440950603.JavaMail.yahoo.ref@mail.yahoo.com>
2016-08-17 13:35 ` fork pipe dup2 exec Tobias Reithmaier
2016-08-17 13:56   ` Thompson, David
2016-08-17 14:09     ` Chris Vine
2016-08-18  9:22       ` Tobias Reithmaier

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).