openurlonclick: using posix_spawnp instead of system ref. comments in #76
This commit is contained in:
parent
2eca262969
commit
bdeb1e7c4c
2 changed files with 6 additions and 3 deletions
|
|
@ -133,8 +133,9 @@ openUrlOnClick(int col, int row, char* url_opener)
|
|||
{
|
||||
char *url = detecturl(col, row, 1);
|
||||
if (url) {
|
||||
char command[strlen(url_opener) + strlen(url) + 5];
|
||||
sprintf(command, "%s \"%s\"&", url_opener, url);
|
||||
system(command);
|
||||
extern char **environ;
|
||||
pid_t junk;
|
||||
char *argv[] = { url_opener, url, NULL };
|
||||
posix_spawnp(&junk, argv[0], NULL, NULL, argv, environ);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue