summaryrefslogtreecommitdiff
path: root/.config/systemd/user/ssh-agent.service
diff options
context:
space:
mode:
Diffstat (limited to '.config/systemd/user/ssh-agent.service')
0 files changed, 0 insertions, 0 deletions
// https://discourse.gnome.org/t/gio-application-commandline-does-trigger-activate-signal/2988/22 // > If you pass G_APPLICATION_HANDLES_COMMAND_LINE in the flags, the // > command-line args are passed to the primary instance and ::activate is // > not emitted. An example again is an something like --hide-window or // > --do-without-disturbing-user which wouldn’t work if the default were to // > trigger ::activate and open the window. So just pass // > G_APPLICATION_HANDLES_COMMAND_LINE and then call // > g_application_activate() in your ::command-line handler g_application_activate(app); return 0; } int main (int argc, char **argv) { DATA data; GtkApplication *app; int status; for(int i=0;i<LEN;i++) { data.t[i]=i; for(int j=0;j<VOLTLEN;j++) data.volt[i][j]=0; for(int j=0;j<TEMPLEN;j++) data.temp[i][j]=0; } // if I don't handle command line //app = gtk_application_new ("org.gtk.example", G_APPLICATION_DEFAULT_FLAGS); // if I handle command line app = gtk_application_new ("org.gtk.example", G_APPLICATION_HANDLES_COMMAND_LINE); g_application_add_main_option(G_APPLICATION(app),"destination",'d',0,G_OPTION_ARG_STRING,"ssh destination","Spartan_Racing_Charger@10.0.0.9"); g_signal_connect (app, "activate", G_CALLBACK (activate), &data); g_signal_connect (app, "command-line", G_CALLBACK (command_line), &data); status = g_application_run (G_APPLICATION (app), argc, argv); g_object_unref (app); //printf("before ssh free\n"); ssh_disconnect(data.session); ssh_free(data.session); // Segmentation fault (core dumped) error, why? maybe double free? so no free is ok? //sftp_free(sftp); return status; }