File: pgrphack.c

package info (click to toggle)
daemontools 1:0.76-13
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 1,296 kB
  • sloc: ansic: 3,800; sh: 464; makefile: 391
file content (13 lines) | stat: -rw-r--r-- 380 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <unistd.h>
#include "strerr.h"
#include "pathexec.h"

#define FATAL "pgrphack: fatal: "

int main(int argc,char **argv,char **envp)
{
  if (!argv[1]) strerr_die1x(100,"pgrphack: usage: pgrphack child");
  setsid(); /* shouldn't fail; if it does, too bad */
  pathexec_run(argv[1],argv   1,envp);
  strerr_die4sys(111,"pgrphack: fatal: ","unable to run ",argv[1],": ");
}