bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-apl] async syscall


From: Kacper Gutowski
Subject: Re: [Bug-apl] async syscall
Date: Sat, 18 Aug 2018 20:17:39 +0200
User-agent: Mutt/1.10.1 (2018-07-13)

On Sat, Aug 18, 2018 at 02:14:35PM -0300, Hudson Flavio Meneses Lacerda wrote:
> How to run a subprocess in background (like system("foo &") in GNU
> Octave)?
> 
> I have tried:
> 
> )HOST gv file.ps &

With )HOST you can do it like that:

      )HOST gv file.ps >&- &

)HOST uses popen(3) to capture and return command's output rather than
just spawning spawning it with system(3).  The & at the end works just
fine in a sense that the shell interpreting the command doesn't wait for
it and exits, but it doesn't close the standard output and )HOST waits
for that.  You can explicitly close it with >&-.

-k



reply via email to

[Prev in Thread] Current Thread [Next in Thread]