aboutsummaryrefslogblamecommitdiffstats
path: root/exec-as.c
blob: 64a0f2747b2e423f0d7f99c2c4be37fc1c8a0ccd (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

















                                                                                                     
/* See LICENSE file for copyright and license details. */
#include <errno.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>


int
main(int argc, char *argv[])
{
	if (argc < 2) {
		fprintf(stderr, "usage: %s command [argv0 [arg ...]]\n", argc ? argv[0] : "exec-as");
	} else {
		execvp(argv[1], &argv[2]);
		fprintf(stderr, "%s: execvp %s: %s\n", argv[0], argv[1], strerror(errno));
	}
	return 138;
}