File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1078,15 +1078,15 @@ fn on_appbtn_clicked(button: >k::Button) {
10781078 return ;
10791079 }
10801080
1081- // Get executable path.
1082- let bash_cmd = format ! ( "{} &disown" , exec_path. unwrap( ) . to_str( ) . unwrap( ) ) ;
1083-
10841081 // Create context channel.
10851082 let ( tx, rx) = glib:: MainContext :: channel ( glib:: Priority :: default ( ) ) ;
10861083
10871084 // Spawn child process in separate thread.
10881085 std:: thread:: spawn ( move || {
1089- let exit_status = Exec :: shell ( bash_cmd) . join ( ) . unwrap ( ) ;
1086+ // Get executable path.
1087+ let exec_path = exec_path. unwrap ( ) . to_str ( ) . unwrap ( ) . to_owned ( ) ;
1088+ let exit_status = Exec :: cmd ( exec_path) . detached ( ) . join ( ) . expect ( "Failed to spawn process" ) ;
1089+
10901090 tx. send ( format ! ( "Exit status successfully? = {:?}" , exit_status. success( ) ) )
10911091 . expect ( "Couldn't send data to channel" ) ;
10921092 } ) ;
You can’t perform that action at this time.
0 commit comments