1

I am using daemontools to start my application.

In the run script, I have something like exec taskset -c 2 [absolute path to my application]

But the problem is that one of the black box library my application expects it to run in a specific directory.

Now my question is how I can run my application in a specific directory without creating a subshell.

Thanks.

HCSF
  • 213
  • 2
  • 9

1 Answers1

1

Just simply change the directory in the run script before you exec into the application. The current directory will be preserved across the exec call.

Something like the below in the run script:

#!/bin/sh
cd /path/to/datadir
exec taskset -c 2 /path/to/bin/myapp
filbranden
  • 21,113
  • 3
  • 58
  • 84