Le 28/07/2017 à 22:09, Lex Trotman a écrit :
> [...]
> 
>> And the problem at hand IIUC is that you cannot run a build command that
>> returns immediately yet has some things in background.  And indeed, I'm
>> afraid it's not possible in the current situation, because Geany waits
>> on the child (on purpose, as it's supposed to be a build tool and wants
>> to read the output and more or less control the child); and that
>> whatever you do the shell it launches will wait on any child before
>> quitting (yes, even if you use "&", because of job control).
>> Unless I'm missing something somewhere, I see 2 solutions:
>>
> 
> The shell should return immediately when the & is used, thats what its
> for, but one thing I discovered is that Geany doesn't look for the
> process to have finished until the pipe is closed, to make sure we
> read all the output.
> 
> So unless the daemon closes its stdout (which is rare) then Geany will
> still wait for it, since it has inherited the shells stdout which is
> the pipe to Geany.

Oooooh damn, you're right.  So it's super easy to fix, just redirect
somewhere, like /dev/null:

porgram >/dev/null 2>&1 &

and that does work indeed.

I somehow thought that the shell waited for the children because of its
job control abilities, but indeed it doesn't and we simply inherit the
pipes.
_______________________________________________
Users mailing list
[email protected]
https://lists.geany.org/cgi-bin/mailman/listinfo/users

Reply via email to