annotate src/hg-wrapper.c @ 36:d66d34065dd9 tip

better less.
author Robert McIntyre <rlm@mit.edu>
date Sun, 19 May 2013 14:40:32 -0400
parents 5caff062fd36
children
rev   line source
rlm@12 1 #include <pipeline.h>
rlm@13 2 #include <unistd.h>
rlm@12 3
rlm@12 4 main( int argc, char ** argv){
rlm@20 5 pipecmd* p =
rlm@26 6 pipecmd_new("/pkg/skel/hg");
rlm@13 7
rlm@12 8 int i;
rlm@12 9 for(i = 1; i < argc; i++){
rlm@12 10 pipecmd_arg(p, argv[i]);
rlm@12 11 }
rlm@12 12
rlm@13 13 setreuid(geteuid(), geteuid());
rlm@13 14 setregid(getegid(), getegid());
rlm@13 15
rlm@12 16 pipecmd_exec(p);
rlm@12 17 }