On Linux, a restart uses execv to replace the current process image with the app executable. Dart starts again, but the process ID stays the same.

Preserve command-line arguments

The restarted app receives no original command-line arguments unless the runner registers them. If your app needs those arguments, add the header and call below to linux/runner/main.cc, or linux/main.cc in older Flutter projects. Keep the rest of main() unchanged:
Flutter’s generated plugin rules link the runner to restart_app_plugin. If you use custom plugin wiring, add that link in linux/CMakeLists.txt after include(flutter/generated_plugins.cmake):
This setup is optional for apps that do not use command-line arguments.

Failed restarts

A successful response confirms that the request was accepted. If execv fails afterward, the plugin logs a warning and leaves the current app running. Resolve the launch failure before retrying.