comparison defaults/hg-wrapper.c @ 13:dcdeabe9e903

yay.
author Robert McIntyre <rlm@mit.edu>
date Wed, 09 Jan 2013 07:31:19 +0000
parents e056798af879
children
comparison
equal deleted inserted replaced
12:e056798af879 13:dcdeabe9e903
1 #include <pipeline.h> 1 #include <pipeline.h>
2 2 #include <unistd.h>
3 3
4 main( int argc, char ** argv){ 4 main( int argc, char ** argv){
5 pipecmd* p = pipecmd_new("hg"); 5 pipecmd* p = pipecmd_new("hg");
6 6
7 int i; 7 int i;
8 for(i = 1; i < argc; i++){ 8 for(i = 1; i < argc; i++){
9 pipecmd_arg(p, argv[i]); 9 pipecmd_arg(p, argv[i]);
10 } 10 }
11 11
12 setreuid(geteuid(), geteuid());
13 setregid(getegid(), getegid());
14
12 pipecmd_exec(p); 15 pipecmd_exec(p);
13
14 } 16 }