deprecate execfuse/autosshfs in favor of autosshfs-mount script
[hband-tools.git] / compiled-tools / setpgrp.c
blob6b42abb1babbeebbbf0f2d07a739e4d510eb3e0b
2 #include <stdio.h>
3 #include <stdlib.h>
4 #include <unistd.h>
5 #include <errno.h>
6 #include <err.h>
9 int main(int argc, char** argv)
11 if(argc < 2)
13 errx(-1, "Usage: setpgrp <command> [arguments]");
17 The System V-style setpgrp(), which takes no arguments, is equivalent to setpgid(0, 0).
20 int error = setpgid(0, 0);
22 if(error != 0)
24 perror("setpgid");
25 exit(error);
28 execvp(argv[1], &argv[1]);
29 exit(127);