What is the problem with the following code:
The first call to "somefunction" works as expected. The function prints "endfunction" and a process in background sleeps 30 seconds. In the second call I thought it should work in the same way, but the script sleeps 30 seconds before it prints "endfunction".
Does someone know the reason of this behavior? Is there another way to do a command substitution of a function that has a background process without have to waiting for that process?
I hope you have understood my problem. My english is not very good.