4
* Copyright (C) 2002-2005 Novell/SUSE
6
* This program is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU General Public License as
8
* published by the Free Software Foundation, version 2 of the
13
#include <sys/types.h>
17
int main(int argc, char *argv[])
21
extern char **environ;
24
fprintf(stderr, "usage: %s program [args] \n", argv[0]);
30
if (pid){ /* parent */
33
while (wait(&status) != pid);
35
if (WIFEXITED(status)){
38
fprintf(stderr, "FAILED, child did not exit normally\n");
43
(void)execve(argv[1], &argv[1], environ);
45
/* exec failed, kill outselves to flag parent */
47
(void)kill(getpid(), SIGKILL);