aboutsummaryrefslogtreecommitdiff
path: root/keep/manual-programs/suckless/st-flexipatch/patch/openselectedtext.c
blob: 42d40e2a1b0caa7d03bba3c771ce29c2b219435c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
void
selopen(const Arg *dummy)
{
	pid_t chpid;

	if ((chpid = fork()) == 0) {
		if (fork() == 0)
			execlp("xdg-open", "xdg-open", getsel(), NULL);
		exit(1);
	}
	if (chpid > 0)
		waitpid(chpid, NULL, 0);
}