In my local machine my executable is stored at
.stack-work/install/x86_64-osx/lts-13.0/8.6.3/bin/nonosolver-exe
In my cloud instance it is stored at
./.stack-work/install/x86_64-linux-tinfo6/lts-13.0/8.6.3/bin/nonosolver-exe
Thus the executable will always be in ./.stack-work/install/{??}/nonosolver-exe
, depending on the machine and version of GHC im using. So in my make file I'm using
find ./.stack-work/install -name nonosolver-exe
to find my executable.
How do I take the result of find
to start a daemon with setsid
(taken from here):
setsid {path to executable} >/dev/null 2>&1 < /dev/null &
I have tried (taken from here) :
find ./.stack-work/install -name nonosolver-exe -exec setsid {} >/dev/null 2>&1 < /dev/null &
to no avail