projects
/
cmccabe-bin
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Add head_grep to grep only the first few lines
[cmccabe-bin]
/
vimstart.c
1
#include <unistd.h>
2
#include <stdio.h>
3
4
int main(int argc, char **argv)
5
{
6
close(0); /* close stdin */
7
8
/* duplicate stdin from stderr */
9
if (dup(2) < 0) {
10
perror("dup failed:");
11
return 1;
12
}
13
execvp("/usr/bin/vim", argv);
14
perror("could not execute program");
15
return 1;
16
}