Re: Basic Question (of execv)



void Agenda_crear(GtkWidget *objeto, gpointer data) {

  g_print("Creando la agenda");
  execlp("touch /home/unmada/test.pfs",NULL);
}

You probably want to use:
        system("touch /home/unmada/test.pfs");
Otherwise your exec arguments should be:
        exec("touch","touch","/home/unmada/test.pfs",NULL);
        
        Remember exec only returns on error - so the next line after exec
should always be error handling.

        nash

-- 
Brett Nash <nash nash nu>
Sometimes it's better to light a flamethrower than curse the darkness.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]