0

I have binary file that I run like env SOME_VARS=some_values ./my_binary

Is there a way that when this execution ends (be it that it ends correctly or it crashes or it gets killed, whatever), it gets started again with the same environment variables?

Ivan
  • 313
  • 1
  • 5
  • 11

1 Answers1

0

You didn't specify platform, I will assume Linux. In which case the Restart and Environment options of a systemd service unit could work nicely. These can be defined in user specific units so it can be run as a non privileged user.

John Mahowald
  • 32,050
  • 2
  • 19
  • 34