1
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
2
/*********************************************************************************
4
* Copyright © 2014 Andrew Smith (GNA SERVICES INC)<Andrew@GNAServicesInc.com>
7
* This file, vaq_spawn.c, is part of Vaquita.
9
* Vaquita is free software: you can redistribute it and/or modify
10
* it under the terms of the GNU General Public License as published by
11
* the Free Software Foundation, either version 3 of the License, or
12
* (at your option) any later version.
14
* Vaquita is distributed in the hope that it will be useful,
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
* GNU General Public License for more details.
19
* You should have received a copy of the GNU General Public License
20
* along with tpad. If not, see <http://www.gnu.org/licenses/>.
21
********************************************************************************/
26
extern gchar* SelfPath;
29
void *vaq_spawn_command(void *ptr){
30
gchar *file_open_new_path=NULL;
31
file_open_new_path = (gchar *) g_strdup((gchar*)ptr);
32
if(fork() == 0)exit(execl("/bin/sh","sh","-c", (gchar*) g_strconcat(SelfPath," ",file_open_new_path,NULL), (gchar*) NULL));
35
gint new_thread_vaq (gchar *file){
38
iThreadReturn = pthread_create(&thread,
42
pthread_join(thread, NULL);
43
return(iThreadReturn);
b'\\ No newline at end of file'